mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 17:15:34 +00:00
Address my own review concerns
Correct the number of hyphens in documentation Use the correct settings tag Simplify color values
This commit is contained in:
parent
f7628ff0a8
commit
2ab6dd0229
4 changed files with 16 additions and 25 deletions
|
@ -1,6 +1,5 @@
|
|||
#include "tags.hpp"
|
||||
|
||||
#include <components/settings/values.hpp>
|
||||
#include <components/fallback/fallback.hpp>
|
||||
|
||||
#include <MyGUI_Colour.h>
|
||||
|
@ -11,8 +10,8 @@ namespace Gui
|
|||
bool replaceTag(std::string_view tag, MyGUI::UString& out)
|
||||
{
|
||||
std::string_view fontcolour = "fontcolour=";
|
||||
|
||||
std::string_view fontcolourhtml = "fontcolourhtml=";
|
||||
std::string_view fontcolouroptional = "fontcoloursetting=";
|
||||
|
||||
if (tag.starts_with(fontcolour))
|
||||
{
|
||||
|
@ -59,13 +58,6 @@ namespace Gui
|
|||
out = html.str();
|
||||
return true;
|
||||
}
|
||||
else if (tag.starts_with(fontcolouroptional))
|
||||
{
|
||||
std::string_view colortag = tag.substr(fontcolouroptional.length());
|
||||
const MyGUI::Colour& customColour = Settings::get<MyGUI::Colour>("GUI", colortag).get();
|
||||
out = customColour.print();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ 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
|
||||
|
@ -171,7 +171,7 @@ 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
|
||||
|
@ -197,7 +197,7 @@ 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
|
||||
|
@ -210,7 +210,7 @@ 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
|
||||
|
@ -220,4 +220,4 @@ This setting provides an "pressed" colour to dialogue topics that meet the color
|
|||
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.
|
||||
A dialogue topic is considered "pressed" if it is the active GUI element and it receives a sustained keyboard or mouse event.
|
||||
|
|
|
@ -129,9 +129,9 @@
|
|||
<Property key="TextAlign" value="Left VCenter"/>
|
||||
|
||||
<BasisSkin type="SimpleText" offset="2 0 1 5" align="Stretch">
|
||||
<State name="normal" colour="#{fontcoloursetting=color topic specific}"/>
|
||||
<State name="highlighted" colour="#{fontcoloursetting=color topic specific over}"/>
|
||||
<State name="pushed" colour="#{fontcoloursetting=color topic specific pressed}"/>
|
||||
<State name="normal" colour="#{setting=GUI,color topic specific}"/>
|
||||
<State name="highlighted" colour="#{setting=GUI,color topic specific over}"/>
|
||||
<State name="pushed" colour="#{setting=GUI,color topic specific pressed}"/>
|
||||
</BasisSkin>
|
||||
</Resource>
|
||||
|
||||
|
@ -140,9 +140,9 @@
|
|||
<Property key="TextAlign" value="Left VCenter"/>
|
||||
|
||||
<BasisSkin type="SimpleText" offset="2 0 1 5" align="Stretch">
|
||||
<State name="normal" colour="#{fontcoloursetting=color topic exhausted}"/>
|
||||
<State name="highlighted" colour="#{fontcoloursetting=color topic exhausted over}"/>
|
||||
<State name="pushed" colour="#{fontcoloursetting=color topic exhausted pressed}"/>
|
||||
<State name="normal" colour="#{setting=GUI,color topic exhausted}"/>
|
||||
<State name="highlighted" colour="#{setting=GUI,color topic exhausted over}"/>
|
||||
<State name="pushed" colour="#{setting=GUI,color topic exhausted pressed}"/>
|
||||
</BasisSkin>
|
||||
</Resource>
|
||||
|
||||
|
|
|
@ -221,16 +221,15 @@ color topic enable = false
|
|||
# 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.58 0.62 0.85 1
|
||||
color topic specific pressed = 0.29 0.36 0.75 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.56 0.56 0.56 1
|
||||
color topic exhausted pressed= 0.44 0.44 0.44 1
|
||||
color topic exhausted over = 0.55 0.55 0.55 1
|
||||
color topic exhausted pressed= 0.45 0.45 0.45 1
|
||||
|
||||
[HUD]
|
||||
|
||||
|
|
Loading…
Reference in a new issue