Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that.

The type differs from the Color type, because contrary to Color, it can
be created from a color predefined in the GUI page (such as "yellow").
Move this predefined color check to the new class instead of hardcoding
it in FromJSVal / ToJSVal, GUIUtil, JSInterface_IGUIObject and to
straighten the latter.

Delete fov_wedge_color from Minimap, unused since introduction in
5275dc862b.

This was SVN commit r22558.
This commit is contained in:
elexis
2019-07-26 18:57:28 +00:00
parent b9f3c8557b
commit 415939b59b
32 changed files with 213 additions and 180 deletions
+2 -3
View File
@@ -19,8 +19,7 @@
#include "GUIManager.h"
#include "CGUI.h"
#include "gui/CGUI.h"
#include "lib/timer.h"
#include "ps/Filesystem.h"
#include "ps/CLogger.h"
@@ -347,7 +346,7 @@ InReaction CGUIManager::HandleEvent(const SDL_Event_* ev)
}
bool CGUIManager::GetPreDefinedColor(const CStr& name, CColor& output) const
bool CGUIManager::GetPreDefinedColor(const CStr& name, CGUIColor& output) const
{
return top()->GetPreDefinedColor(name, output);
}