GUI ThemingFrom Globulation2GUI theming is made at three levels in glob2: color theming, background theming and button theming. Color themingAll widget share some color constants. They are defined in the GAGGUI::ColorTheme namespace and initialized in the beginning of the libgag/src/GUIBase.cpp file. Background themingEach GUI screen inherits from the Glob2Screen class, defined in src/Glob2Screen.h and implemented in src/Glob2Screen.cpp. This class reimplement the Screen::paint virtual method so that a custom paint method is implemented. Button themingButton can have associated bitmaps. To do so, when you create the button, pass the name of a valid loaded sprite and two valid frame numbers, the first for idle and the second for highlighted state. If you pass no sprite name ("") and -1 to frame numbers, bitmap are disabled and default color theme is used. | ||