mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 22:45:33 +00:00
Merge remote-tracking branch 'kunesj/master'
This commit is contained in:
commit
d2cd151f77
10 changed files with 84 additions and 15 deletions
|
@ -52,6 +52,7 @@ Programmers
|
||||||
jeaye
|
jeaye
|
||||||
Jeffrey Haines (Jyby)
|
Jeffrey Haines (Jyby)
|
||||||
Jengerer
|
Jengerer
|
||||||
|
Jiří Kuneš (kunesj)
|
||||||
Joel Graff (graffy)
|
Joel Graff (graffy)
|
||||||
John Blomberg (fstp)
|
John Blomberg (fstp)
|
||||||
Jordan Ayers
|
Jordan Ayers
|
||||||
|
@ -59,7 +60,6 @@ Programmers
|
||||||
Julien Voisin (jvoisin/ap0)
|
Julien Voisin (jvoisin/ap0)
|
||||||
Karl-Felix Glatzer (k1ll)
|
Karl-Felix Glatzer (k1ll)
|
||||||
Kevin Poitra (PuppyKevin)
|
Kevin Poitra (PuppyKevin)
|
||||||
kunesj
|
|
||||||
Lars Söderberg (Lazaroth)
|
Lars Söderberg (Lazaroth)
|
||||||
lazydev
|
lazydev
|
||||||
Leon Saunders (emoose)
|
Leon Saunders (emoose)
|
||||||
|
|
|
@ -520,15 +520,13 @@ namespace MWGui
|
||||||
|
|
||||||
void HUD::setCrosshairOwned(bool owned)
|
void HUD::setCrosshairOwned(bool owned)
|
||||||
{
|
{
|
||||||
MyGUI::Colour red = MyGUI::Colour(1.0, 0, 0);
|
|
||||||
MyGUI::Colour white = MyGUI::Colour(1.0, 1.0, 1.0);
|
|
||||||
if(owned)
|
if(owned)
|
||||||
{
|
{
|
||||||
mCrosshair->setColour(red);
|
mCrosshair->changeWidgetSkin("HUD_Crosshair_Owned");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCrosshair->setColour(white);
|
mCrosshair->changeWidgetSkin("HUD_Crosshair");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ namespace MWGui
|
||||||
, mLastMouseY(0)
|
, mLastMouseY(0)
|
||||||
, mEnabled(true)
|
, mEnabled(true)
|
||||||
, mFullHelp(false)
|
, mFullHelp(false)
|
||||||
|
, mShowOwned(0)
|
||||||
{
|
{
|
||||||
getWidget(mDynamicToolTipBox, "DynamicToolTipBox");
|
getWidget(mDynamicToolTipBox, "DynamicToolTipBox");
|
||||||
|
|
||||||
|
@ -55,6 +56,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mMainWidget->getChildAt(i)->setVisible(false);
|
mMainWidget->getChildAt(i)->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mShowOwned = Settings::Manager::getInt("show owned", "Game");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTips::setEnabled(bool enabled)
|
void ToolTips::setEnabled(bool enabled)
|
||||||
|
@ -370,6 +373,18 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mDynamicToolTipBox->setVisible(true);
|
mDynamicToolTipBox->setVisible(true);
|
||||||
|
|
||||||
|
if(mShowOwned == 1 || mShowOwned == 3)
|
||||||
|
{
|
||||||
|
if(checkOwned())
|
||||||
|
{
|
||||||
|
mDynamicToolTipBox->changeWidgetSkin("HUD_Box_NoTransp_Owned");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mDynamicToolTipBox->changeWidgetSkin("HUD_Box_NoTransp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string caption = info.caption;
|
std::string caption = info.caption;
|
||||||
std::string image = info.icon;
|
std::string image = info.icon;
|
||||||
int imageSize = (image != "") ? info.imageSize : 0;
|
int imageSize = (image != "") ? info.imageSize : 0;
|
||||||
|
|
|
@ -122,6 +122,8 @@ namespace MWGui
|
||||||
bool mEnabled;
|
bool mEnabled;
|
||||||
|
|
||||||
bool mFullHelp;
|
bool mFullHelp;
|
||||||
|
|
||||||
|
int mShowOwned;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace MWGui
|
||||||
, mRestAllowed(true)
|
, mRestAllowed(true)
|
||||||
, mFPS(0.0f)
|
, mFPS(0.0f)
|
||||||
, mFallbackMap(fallbackMap)
|
, mFallbackMap(fallbackMap)
|
||||||
, mShowOwned(false)
|
, mShowOwned(0)
|
||||||
, mVersionDescription(versionDescription)
|
, mVersionDescription(versionDescription)
|
||||||
{
|
{
|
||||||
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
||||||
|
@ -263,7 +263,7 @@ namespace MWGui
|
||||||
MyGUI::ClipboardManager::getInstance().eventClipboardChanged += MyGUI::newDelegate(this, &WindowManager::onClipboardChanged);
|
MyGUI::ClipboardManager::getInstance().eventClipboardChanged += MyGUI::newDelegate(this, &WindowManager::onClipboardChanged);
|
||||||
MyGUI::ClipboardManager::getInstance().eventClipboardRequested += MyGUI::newDelegate(this, &WindowManager::onClipboardRequested);
|
MyGUI::ClipboardManager::getInstance().eventClipboardRequested += MyGUI::newDelegate(this, &WindowManager::onClipboardRequested);
|
||||||
|
|
||||||
mShowOwned = Settings::Manager::getBool("show owned", "Game");
|
mShowOwned = Settings::Manager::getInt("show owned", "Game");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::initUI()
|
void WindowManager::initUI()
|
||||||
|
@ -1042,7 +1042,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mToolTips->setFocusObject(focus);
|
mToolTips->setFocusObject(focus);
|
||||||
|
|
||||||
if(mShowOwned && mHud)
|
if(mHud && (mShowOwned == 2 || mShowOwned == 3))
|
||||||
{
|
{
|
||||||
bool owned = mToolTips->checkOwned();
|
bool owned = mToolTips->checkOwned();
|
||||||
mHud->setCrosshairOwned(owned);
|
mHud->setCrosshairOwned(owned);
|
||||||
|
@ -1095,10 +1095,21 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
std::string tag(_tag);
|
std::string tag(_tag);
|
||||||
|
|
||||||
|
std::string MyGuiPrefix = "setting=";
|
||||||
|
size_t MyGuiPrefixLength = MyGuiPrefix.length();
|
||||||
|
|
||||||
std::string tokenToFind = "sCell=";
|
std::string tokenToFind = "sCell=";
|
||||||
size_t tokenLength = tokenToFind.length();
|
size_t tokenLength = tokenToFind.length();
|
||||||
|
|
||||||
if (tag.compare(0, tokenLength, tokenToFind) == 0)
|
if(tag.compare(0, MyGuiPrefixLength, MyGuiPrefix) == 0)
|
||||||
|
{
|
||||||
|
tag = tag.substr(MyGuiPrefixLength, tag.length());
|
||||||
|
std::string settingSection = tag.substr(0, tag.find(","));
|
||||||
|
std::string settingTag = tag.substr(tag.find(",")+1, tag.length());
|
||||||
|
|
||||||
|
_result = Settings::Manager::getString(settingTag, settingSection);
|
||||||
|
}
|
||||||
|
else if (tag.compare(0, tokenLength, tokenToFind) == 0)
|
||||||
{
|
{
|
||||||
_result = mTranslationDataStorage.translateCellName(tag.substr(tokenLength));
|
_result = mTranslationDataStorage.translateCellName(tag.substr(tokenLength));
|
||||||
}
|
}
|
||||||
|
|
|
@ -487,7 +487,7 @@ namespace MWGui
|
||||||
|
|
||||||
std::map<std::string, std::string> mFallbackMap;
|
std::map<std::string, std::string> mFallbackMap;
|
||||||
|
|
||||||
bool mShowOwned;
|
int mShowOwned;
|
||||||
|
|
||||||
std::string mVersionDescription;
|
std::string mVersionDescription;
|
||||||
|
|
||||||
|
@ -495,6 +495,7 @@ namespace MWGui
|
||||||
* Called when MyGUI tries to retrieve a tag's value. Tags must be denoted in #{tag} notation and will be replaced upon setting a user visible text/property.
|
* Called when MyGUI tries to retrieve a tag's value. Tags must be denoted in #{tag} notation and will be replaced upon setting a user visible text/property.
|
||||||
* Supported syntax:
|
* Supported syntax:
|
||||||
* #{GMSTName}: retrieves String value of the GMST called GMSTName
|
* #{GMSTName}: retrieves String value of the GMST called GMSTName
|
||||||
|
* #{setting=CATEGORY_NAME,SETTING_NAME}: retrieves String value of SETTING_NAME under category CATEGORY_NAME from settings.cfg
|
||||||
* #{sCell=CellID}: retrieves translated name of the given CellID (used only by some Morrowind localisations, in others cell ID is == cell name)
|
* #{sCell=CellID}: retrieves translated name of the given CellID (used only by some Morrowind localisations, in others cell ID is == cell name)
|
||||||
* #{fontcolour=FontColourName}: retrieves the value of the fallback setting "FontColor_color_<FontColourName>" from openmw.cfg,
|
* #{fontcolour=FontColourName}: retrieves the value of the fallback setting "FontColor_color_<FontColourName>" from openmw.cfg,
|
||||||
* in the format "r g b a", float values in range 0-1. Useful for "Colour" and "TextColour" properties in skins.
|
* in the format "r g b a", float values in range 0-1. Useful for "Colour" and "TextColour" properties in skins.
|
||||||
|
|
|
@ -122,8 +122,7 @@
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Crosshair -->
|
<!-- Crosshair -->
|
||||||
<Widget type="ImageBox" skin="ImageBox" position="0 0 32 32" align="Center Center" name="Crosshair">
|
<Widget type="ImageBox" skin="HUD_Crosshair" position="0 0 32 32" align="Center Center" name="Crosshair">
|
||||||
<Property key="ImageTexture" value="textures\target.dds"/>
|
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Basic FPSCounter box -->
|
<!-- Basic FPSCounter box -->
|
||||||
|
|
|
@ -32,4 +32,31 @@
|
||||||
|
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
|
<Resource type="ResourceSkin" name="HUD_Box_NoTransp_Owned" size="40 40">
|
||||||
|
|
||||||
|
<!-- The interior of the box -->
|
||||||
|
|
||||||
|
<Child type="Widget" skin="DialogBG_Owned" offset="0 0 40 40" align="Stretch" name="Client"/>
|
||||||
|
|
||||||
|
<!-- Borders -->
|
||||||
|
|
||||||
|
<Child type="Widget" skin="MW_Box" offset="0 0 40 40" align="Left Stretch" name="Client"/>
|
||||||
|
|
||||||
|
</Resource>
|
||||||
|
|
||||||
|
<!-- Defines crosshair color -->
|
||||||
|
<Resource type="ResourceSkin" name="HUD_Crosshair" size="32 32" texture="textures\target.dds">
|
||||||
|
<BasisSkin type="MainSkin" offset="0 0 32 32">
|
||||||
|
<State name="normal" offset="0 0 32 32"/>
|
||||||
|
</BasisSkin>
|
||||||
|
</Resource>
|
||||||
|
|
||||||
|
<!-- Defines owned crosshair color -->
|
||||||
|
<Resource type="ResourceSkin" name="HUD_Crosshair_Owned" size="32 32" texture="textures\target.dds">
|
||||||
|
<Property key="Colour" value="#{setting=GUI,color crosshair owned}"/>
|
||||||
|
<BasisSkin type="MainSkin" offset="0 0 32 32">
|
||||||
|
<State name="normal" offset="0 0 32 32"/>
|
||||||
|
</BasisSkin>
|
||||||
|
</Resource>
|
||||||
|
|
||||||
</MyGUI>
|
</MyGUI>
|
||||||
|
|
|
@ -129,6 +129,14 @@
|
||||||
</BasisSkin>
|
</BasisSkin>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|
||||||
|
<!-- Defines a owned background -->
|
||||||
|
<Resource type="ResourceSkin" name="DialogBG_Owned" size="8 8" texture="white">
|
||||||
|
<Property key="Colour" value="#{setting=GUI,color background owned}"/>
|
||||||
|
<BasisSkin type="MainSkin" offset="0 0 8 8">
|
||||||
|
<State name="normal" offset="0 0 8 8"/>
|
||||||
|
</BasisSkin>
|
||||||
|
</Resource>
|
||||||
|
|
||||||
<!-- These define the dialog borders -->
|
<!-- These define the dialog borders -->
|
||||||
<Resource type="ResourceSkin" name="DB_B" size="512 4" texture="textures\menu_thick_border_bottom.dds">
|
<Resource type="ResourceSkin" name="DB_B" size="512 4" texture="textures\menu_thick_border_bottom.dds">
|
||||||
<BasisSkin type="TileRect" offset="0 0 512 4" align="Stretch">
|
<BasisSkin type="TileRect" offset="0 0 512 4" align="Stretch">
|
||||||
|
|
|
@ -36,6 +36,10 @@ werewolf overlay = true
|
||||||
|
|
||||||
stretch menu background = false
|
stretch menu background = false
|
||||||
|
|
||||||
|
# colour definitions (red green blue alpha)
|
||||||
|
color background owned = 0.15 0 0 1
|
||||||
|
color crosshair owned = 1 0.15 0.15 1
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
# Camera field of view
|
# Camera field of view
|
||||||
field of view = 55
|
field of view = 55
|
||||||
|
@ -162,8 +166,12 @@ best attack = false
|
||||||
|
|
||||||
difficulty = 0
|
difficulty = 0
|
||||||
|
|
||||||
# change crosshair color when pointing on owned object
|
# Change crosshair/toolTip color when pointing on owned object
|
||||||
show owned = false
|
#0: nothing changed
|
||||||
|
#1: tint toolTip
|
||||||
|
#2: tint crosshair
|
||||||
|
#3: both
|
||||||
|
show owned = 0
|
||||||
|
|
||||||
[Saves]
|
[Saves]
|
||||||
character =
|
character =
|
||||||
|
|
Loading…
Reference in a new issue