diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 56f69eb906..2e052de768 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -794,18 +794,32 @@ namespace MWGui if (!Settings::gui().mColorTopicEnable) return; - const MyGUI::Colour& specialColour = Settings::gui().mColorTopicSpecific; - const MyGUI::Colour& oldColour = Settings::gui().mColorTopicExhausted; - for (const std::string& keyword : mKeywords) { int flag = MWBase::Environment::get().getDialogueManager()->getTopicFlag(ESM::RefId::stringRefId(keyword)); MyGUI::Button* button = mTopicsList->getItemWidget(keyword); + const auto oldCaption = button->getCaption(); + const MyGUI::IntSize oldSize = button->getSize(); + bool changed = false; if (flag & MWBase::DialogueManager::TopicType::Specific) - button->getSubWidgetText()->setTextColour(specialColour); + { + button->changeWidgetSkin("MW_ListLine_Specific"); + changed = true; + } else if (flag & MWBase::DialogueManager::TopicType::Exhausted) - button->getSubWidgetText()->setTextColour(oldColour); + { + button->changeWidgetSkin("MW_ListLine_Exhausted"); + changed = true; + } + + if (changed) + { + button->setCaption(oldCaption); + button->getSubWidgetText()->setWordWrap(true); + button->getSubWidgetText()->setTextAlign(MyGUI::Align::Left); + button->setSize(oldSize); + } } } diff --git a/components/settings/categories/gui.hpp b/components/settings/categories/gui.hpp index 4a5e50fd8a..a26364c5dd 100644 --- a/components/settings/categories/gui.hpp +++ b/components/settings/categories/gui.hpp @@ -33,7 +33,11 @@ namespace Settings SettingValue mKeyboardNavigation{ mIndex, "GUI", "keyboard navigation" }; SettingValue mColorTopicEnable{ mIndex, "GUI", "color topic enable" }; SettingValue mColorTopicSpecific{ mIndex, "GUI", "color topic specific" }; + SettingValue mColorTopicSpecificOver{ mIndex, "GUI", "color topic specific over" }; + SettingValue mColorTopicSpecificPressed{ mIndex, "GUI", "color topic specific pressed" }; SettingValue mColorTopicExhausted{ mIndex, "GUI", "color topic exhausted" }; + SettingValue mColorTopicExhaustedOver{ mIndex, "GUI", "color topic exhausted over" }; + SettingValue mColorTopicExhaustedPressed{ mIndex, "GUI", "color topic exhausted pressed" }; }; } diff --git a/docs/source/reference/modding/settings/GUI.rst b/docs/source/reference/modding/settings/GUI.rst index 763e64ab99..8a27ed2c01 100644 --- a/docs/source/reference/modding/settings/GUI.rst +++ b/docs/source/reference/modding/settings/GUI.rst @@ -157,8 +157,8 @@ color topic specific -------------------- :Type: RGBA floating point -:Range: 0.0 to 1.0 -:Default: empty +:Range: 0.0 to 1.0 for each channel +:Default: 0.45 0.5 0.8 1 (blue) This setting overrides the colour of dialogue topics that have a response unique to the actors speaking. The value is composed of four floating point values representing the red, green, blue and alpha channels. @@ -166,15 +166,67 @@ The alpha value is currently ignored. A topic response is considered unique if its Actor filter field contains the speaking actor's object ID and hasn't yet been read. +color topic specific over +------------------------- + +:Type: RGBA floating point +:Range: 0.0 to 1.0 for each channel +:Default: 0.6 0.6 0.85 1 (blue) + +This setting provides an "over" colour to dialogue topics that meet the color topic specific criteria. +The value is composed of four floating point values representing the red, green, blue and alpha channels. +The alpha value is currently ignored. + +A dialogue topic is considered "over" if it is the active GUI element through keyboard or mouse events. + +color topic specific pressed +---------------------------- + +:Type: RGBA floating point +:Range: 0.0 to 1.0 for each channel +:Default: 0.3 0.35 0.75 1 (blue) + +This setting provides an "pressed" colour to dialogue topics that meet the color topic specific criteria. +The value is composed of four floating point values representing the red, green, blue and alpha channels. +The alpha value is currently ignored. + +A dialogue topic is considered "pressed" if it is the active GUI element and it receives a sustained keyboard or mouse event. + color topic exhausted --------------------- :Type: RGBA floating point -:Range: 0.0 to 1.0 -:Default: empty +:Range: 0.0 to 1.0 for each channel +:Default: 0.3 0.3 0.3 1 (grey) This setting overrides the colour of dialogue topics which have been "exhausted" by the player. The value is composed of four floating point values representing the red, green, blue and alpha channels. The alpha value is currently ignored. A topic is considered "exhausted" if the response the player is about to see has already been seen. + +color topic exhausted over +-------------------------- + +:Type: RGBA floating point +:Range: 0.0 to 1.0 for each channel +:Default: 0.55 0.55 0.55 1 (grey) + +This setting provides an "over" colour to dialogue topics that meet the color topic exhausted criteria. +The value is composed of four floating point values representing the red, green, blue and alpha channels. +The alpha value is currently ignored. + +A dialogue topic is considered "over" if it is the active GUI element through keyboard or mouse events. + +color topic exhausted pressed +----------------------------- + +:Type: RGBA floating point +:Range: 0.0 to 1.0 for each channel +:Default: 0.45 0.45 0.45 1 (grey) + +This setting provides a "pressed" colour to dialogue topics that meet the color topic exhausted criteria. +The value is composed of four floating point values representing the red, green, blue and alpha channels. +The alpha value is currently ignored. + +A dialogue topic is considered "pressed" if it is the active GUI element and it receives a sustained keyboard or mouse event. diff --git a/files/data/mygui/openmw_list.skin.xml b/files/data/mygui/openmw_list.skin.xml index 75f4b9e850..d17b258b80 100644 --- a/files/data/mygui/openmw_list.skin.xml +++ b/files/data/mygui/openmw_list.skin.xml @@ -124,6 +124,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 1aab8554ae..e4636f0ce9 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -218,14 +218,14 @@ 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 -# Default to blue color topic specific = 0.45 0.5 0.8 1 +color topic specific over = 0.6 0.6 0.85 1 +color topic specific pressed = 0.3 0.35 0.75 1 # The color of dialogue topic keywords that gives already read responses -# Format R G B A or empty for no special formatting -# Default to grey color topic exhausted = 0.3 0.3 0.3 1 +color topic exhausted over = 0.55 0.55 0.55 1 +color topic exhausted pressed = 0.45 0.45 0.45 1 [HUD]