mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #1647 from marauder2k9-torque/development
Some checks are pending
Linux Build / ${{matrix.config.name}} (map[build_type:Release cc:gcc cxx:g++ generator:Ninja name:Ubuntu Latest GCC]) (push) Waiting to run
MacOSX Build / ${{matrix.config.name}} (map[build_type:Release cc:clang cxx:clang++ generator:Ninja name:MacOSX Latest Clang]) (push) Waiting to run
Windows Build / ${{matrix.config.name}} (map[build_type:Release cc:cl cxx:cl environment_script:C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat generator:Visual Studio 17 2022 name:Windows Latest MSVC]) (push) Waiting to run
Some checks are pending
Linux Build / ${{matrix.config.name}} (map[build_type:Release cc:gcc cxx:g++ generator:Ninja name:Ubuntu Latest GCC]) (push) Waiting to run
MacOSX Build / ${{matrix.config.name}} (map[build_type:Release cc:clang cxx:clang++ generator:Ninja name:MacOSX Latest Clang]) (push) Waiting to run
Windows Build / ${{matrix.config.name}} (map[build_type:Release cc:cl cxx:cl environment_script:C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat generator:Visual Studio 17 2022 name:Windows Latest MSVC]) (push) Waiting to run
Update guiPopUpCtrl.cpp
This commit is contained in:
commit
0f32c10a2c
1 changed files with 23 additions and 17 deletions
|
|
@ -657,27 +657,33 @@ void GuiPopUpMenuCtrl::addEntry( const char *buf, S32 id, U32 scheme )
|
||||||
e.ascii = cp ? cp[1] : 0;
|
e.ascii = cp ? cp[1] : 0;
|
||||||
|
|
||||||
// See if there is a colour box defined with the text
|
// See if there is a colour box defined with the text
|
||||||
char *cb = dStrchr( e.buf, '|' );
|
char* firstBar = dStrchr(e.buf, '|');
|
||||||
if ( cb )
|
if (firstBar)
|
||||||
{
|
{
|
||||||
e.usesColorBox = true;
|
char* red = firstBar + 1;
|
||||||
cb[0] = '\0';
|
char* secondBar = dStrchr(red, '|');
|
||||||
|
if (secondBar)
|
||||||
|
{
|
||||||
|
char* green = secondBar + 1;
|
||||||
|
char* thirdBar = dStrchr(green, '|');
|
||||||
|
if (thirdBar)
|
||||||
|
{
|
||||||
|
char* blue = thirdBar + 1;
|
||||||
|
|
||||||
char* red = &cb[1];
|
// Now we know the format is valid: text|r|g|b
|
||||||
cb = dStrchr(red, '|');
|
firstBar[0] = '\0';
|
||||||
cb[0] = '\0';
|
secondBar[0] = '\0';
|
||||||
char* green = &cb[1];
|
thirdBar[0] = '\0';
|
||||||
cb = dStrchr(green, '|');
|
|
||||||
cb[0] = '\0';
|
|
||||||
char* blue = &cb[1];
|
|
||||||
|
|
||||||
U32 r = dAtoi(red);
|
U32 r = dAtoi(red);
|
||||||
U32 g = dAtoi(green);
|
U32 g = dAtoi(green);
|
||||||
U32 b = dAtoi(blue);
|
U32 b = dAtoi(blue);
|
||||||
|
|
||||||
e.colorbox = ColorI(r,g,b);
|
e.colorbox = ColorI(r, g, b);
|
||||||
|
e.usesColorBox = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e.usesColorBox = false;
|
e.usesColorBox = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue