22 #ifndef GUI_THEME_EVAL_H 23 #define GUI_THEME_EVAL_H 25 #include "common/scummsys.h" 26 #include "common/hashmap.h" 27 #include "common/hash-str.h" 28 #include "common/stack.h" 29 #include "common/str.h" 30 #include "common/textconsole.h" 31 #include "graphics/font.h" 33 #include "gui/ThemeLayout.h" 49 void buildBuiltinVars();
58 error(
"CRITICAL: Missing variable: '%s'", s.c_str());
72 void setScaleFactor(
float s) { _scaleFactor = s; }
74 void setVar(
const Common::String &name,
int val) { _vars[name] = val; }
84 ThemeEval &addPadding(int16 l, int16 r, int16 t, int16 b);
86 ThemeEval &closeLayout() { _curLayout.pop();
return *
this; }
87 ThemeEval &closeDialog() { _curLayout.pop(); _curDialog.
clear();
return *
this; }
92 bool getWidgetData(
const Common::String &widget, int16 &x, int16 &y, int16 &w, int16 &h);
93 bool getWidgetData(
const Common::String &widget, int16 &x, int16 &y, int16 &w, int16 &h,
bool &useRTL);
97 #ifdef LAYOUT_DEBUG_DIALOG 99 if (_layouts.
contains(LAYOUT_DEBUG_DIALOG)) {
100 _layouts[LAYOUT_DEBUG_DIALOG]->debugDraw(screen, font);
104 for (
auto l = _layouts.begin(); l != _layouts.end(); ++l)
105 list +=
" " + l->_key;
107 warning(
"debugDraw: Unknown layout %s\nList:%s", LAYOUT_DEBUG_DIALOG, list.c_str());
116 VariablesMap _builtin;
Definition: managed_surface.h:51
TextAlign
Definition: font.h:48
void warning(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: ThemeEval.h:37
Items are aligned to the left for vertical layouts or to the top for horizontal layouts.
Definition: ThemeLayout.h:59
Align the text to start of line (virtual).
Definition: font.h:50
bool contains(const Key &key) const
Definition: hashmap.h:594
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
ItemAlign
Cross-direction alignment of layout children.
Definition: ThemeLayout.h:58