This commit introduces six new color settings for dialogue topic keywords

referencing settings.cfg and settings-default.cfg. These settings work similarly
to the color references found in openmw.cfg and Morrowind.ini.

Changes include:

Removal of deprecated settings:
color topic specific
color topic exhausted
Addition of six new color settings to settings.cfg and settings-default.cfg
Updated description in settings-default.cfg to reflect the new color format
pull/3236/head
Kagernac 7 months ago
parent 02730af391
commit f9577d904c

@ -32,5 +32,13 @@ namespace MWGui
journalTopic = getTextColour("journal_topic");
journalTopicOver = getTextColour("journal_topic_over");
journalTopicPressed = getTextColour("journal_topic_pressed");
specific = getTextColour("specific");
specificOver = getTextColour("specific_over");
specificPressed = getTextColour("specific_pressed");
exhausted = getTextColour("exhausted");
exhaustedOver = getTextColour("exhausted_over");
exhaustedPressed = getTextColour("exhausted_pressed");
}
}

@ -27,6 +27,14 @@ namespace MWGui
MyGUI::Colour journalTopicOver;
MyGUI::Colour journalTopicPressed;
MyGUI::Colour specific;
MyGUI::Colour specificOver;
MyGUI::Colour specificPressed;
MyGUI::Colour exhausted;
MyGUI::Colour exhaustedOver;
MyGUI::Colour exhaustedPressed;
public:
void loadColours();
};

@ -109,7 +109,9 @@ static const std::set<std::string_view> allowedKeysNonNumeric = { "Blood_Model_0
"FontColor_color_link", "FontColor_color_link_over", "FontColor_color_link_pressed", "FontColor_color_magic",
"FontColor_color_magic_fill", "FontColor_color_misc", "FontColor_color_negative", "FontColor_color_normal",
"FontColor_color_normal_over", "FontColor_color_normal_pressed", "FontColor_color_notify",
"FontColor_color_positive", "FontColor_color_weapon_fill", "Fonts_Font_0", "Fonts_Font_1", "Fonts_Font_2",
"FontColor_color_positive", "FontColor_color_weapon_fill", "FontColor_color_specific", "FontColor_color_specific_over",
"FontColor_color_specific_pressed", "FontColor_color_exhausted", "FontColor_color_exhausted_over", "FontColor_color_exhausted_pressed",
"Fonts_Font_0", "Fonts_Font_1", "Fonts_Font_2",
"Level_Up_Default", "Moons_Script_Color", "Movies_Company_Logo", "Movies_Morrowind_Logo", "Movies_New_Game",
"Question_10_AnswerOne", "Question_10_AnswerThree", "Question_10_AnswerTwo", "Question_10_Question",
"Question_10_Sound", "Question_1_AnswerOne", "Question_1_AnswerThree", "Question_1_AnswerTwo",

@ -32,8 +32,12 @@ namespace Settings
SettingValue<MyGUI::Colour> mColorCrosshairOwned{ mIndex, "GUI", "color crosshair owned" };
SettingValue<bool> mKeyboardNavigation{ mIndex, "GUI", "keyboard navigation" };
SettingValue<bool> mColorTopicEnable{ mIndex, "GUI", "color topic enable" };
SettingValue<MyGUI::Colour> mColorTopicSpecific{ mIndex, "GUI", "color topic specific" };
SettingValue<MyGUI::Colour> mColorTopicExhausted{ mIndex, "GUI", "color topic exhausted" };
SettingValue<MyGUI::Colour> mColorTopicSpecific{ mIndex, "GUI", "FontColor_color_specific" };
SettingValue<MyGUI::Colour> mColorTopicSpecificOver{ mIndex, "GUI", "FontColor_color_specific_over" };
SettingValue<MyGUI::Colour> mColorTopicSpecificPressed{ mIndex, "GUI", "FontColor_color_specific_pressed" };
SettingValue<MyGUI::Colour> mColorTopicExhausted{ mIndex, "GUI", "FontColor_color_exhausted" };
SettingValue<MyGUI::Colour> mColorTopicExhaustedOver{ mIndex, "GUI", "FontColor_color_exhausted_over" };
SettingValue<MyGUI::Colour> mColorTopicExhaustedPressed{ mIndex, "GUI", "FontColor_color_exhausted_pressed" };
};
}

@ -1,5 +1,6 @@
#include "tags.hpp"
#include <components/settings/values.hpp>
#include <components/fallback/fallback.hpp>
#include <MyGUI_Colour.h>
@ -10,7 +11,6 @@ namespace Gui
bool replaceTag(std::string_view tag, MyGUI::UString& out)
{
std::string_view fontcolour = "fontcolour=";
std::string_view fontcolourhtml = "fontcolourhtml=";
if (tag.starts_with(fontcolour))
@ -19,7 +19,12 @@ namespace Gui
fallbackName += tag.substr(fontcolour.length());
std::string_view str = Fallback::Map::getString(fallbackName);
if (str.empty())
throw std::runtime_error("Unknown fallback name: " + fallbackName);
{
std::string_view category = "GUI";
str = Settings::Manager::getString(fallbackName, category);
if (str.empty())
throw std::runtime_error("Unable to map setting to value: " + fallbackName);
}
std::string ret[3];
unsigned int j = 0;

@ -127,22 +127,22 @@
<Resource type="ResourceSkin" name="MW_ListLine_Specific" size="5 5">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Left VCenter"/>
<BasisSkin type="SimpleText" offset="2 0 1 5" align="Stretch">
<State name="normal" colour="#{fontcolour=link}"/>
<State name="highlighted" colour="#{fontcolour=link_over}"/>
<State name="pushed" colour="#{fontcolour=link_pressed}"/>
<State name="normal" colour="#{fontcolour=specific}"/>
<State name="highlighted" colour="#{fontcolour=specific_over}"/>
<State name="pushed" colour="#{fontcolour=specific_pressed}"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_ListLine_Exhausted" size="5 5">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Left VCenter"/>
<BasisSkin type="SimpleText" offset="2 0 1 5" align="Stretch">
<State name="normal" colour="#525252"/>
<State name="highlighted" colour="#666666"/>
<State name="pushed" colour="#3D3D3D"/>
<State name="normal" colour="#{fontcolour=exhausted}"/>
<State name="highlighted" colour="#{fontcolour=exhausted_over}"/>
<State name="pushed" colour="#{fontcolour=exhausted_pressed}"/>
</BasisSkin>
</Resource>

@ -218,14 +218,19 @@ keyboard navigation = true
color topic enable = false
# The color of dialogue topic keywords that gives unique actor responses
# Format R G B A or empty for no special formatting
# Format (R,G,B) (255,255,255) or empty for no special formatting
# Default to blue
color topic specific = 0.45 0.5 0.8 1
FontColor_color_specific = 112,126,207
FontColor_color_specific_over = 143,155,218
FontColor_color_specific_pressed = 175,184,228
# The color of dialogue topic keywords that gives already read responses
# Format R G B A or empty for no special formatting
# Format (R,G,B) (255,255,255) or empty for no special formatting
# Default to grey
color topic exhausted = 0.3 0.3 0.3 1
FontColor_color_exhausted = 103,103,111
FontColor_color_exhausted_over = 170,170,188
FontColor_color_exhausted_pressed = 69,69,85
[HUD]

Loading…
Cancel
Save