Fix static initialization order problem with Horus GUI (#4141)
* [480x272] Fix static initialization order problem with Layout, Theme, & Widget factories. * [480x272] Fix return from drawTimerMode(). * [480x272] Remove use of macros for registered Layout, Widget, & Theme class lists; remove extern declarations (cosmetic). * [480x272] Convert Layout and Theme registry to dynamic lists (still max. of 10 each); Hide indicator arrow when user is at start/end of available widgets in spinner UI; Add some sanity checking to pointer usage in screens_setup; Add an (arbitrary) limit of 20 Widgets; And a line break! :)
This commit is contained in:
committed by
Bertrand Songis
parent
d4d3d51a9d
commit
bce42bb25c
@@ -21,6 +21,8 @@
|
||||
#ifndef _THEME_H_
|
||||
#define _THEME_H_
|
||||
|
||||
#include <list>
|
||||
|
||||
class BitmapBuffer;
|
||||
|
||||
#define MAX_THEME_OPTIONS 5
|
||||
@@ -91,13 +93,11 @@ inline const char * getThemePath(const char * filename)
|
||||
return theme->getFilePath(filename);
|
||||
}
|
||||
|
||||
#define MAX_REGISTERED_THEMES 10
|
||||
extern unsigned int countRegisteredThemes;
|
||||
void registerTheme(Theme * theme);
|
||||
extern Theme * registeredThemes[MAX_REGISTERED_THEMES]; // TODO dynamic
|
||||
|
||||
Theme * getTheme(const char * name);
|
||||
void loadTheme(Theme * theme);
|
||||
void loadTheme();
|
||||
|
||||
#define MAX_REGISTERED_THEMES 10
|
||||
std::list<Theme *> & getRegisteredThemes();
|
||||
|
||||
#endif // _THEME_H_
|
||||
|
||||
Reference in New Issue
Block a user