198#ifdef VIDEO_STANDARD_PAL
506 return mCurrentScreen;
520 std::unique_ptr<Callback> mCallback;
522 std::map<const char *, std::unique_ptr<UIScreen>,
StrLess> mScreens;
523 std::map<const char *, std::unique_ptr<UIPanel>,
StrLess> mPanels;
524 std::map<const char *, std::unique_ptr<UIStyle>,
StrLess> mStyles;
528 std::list<std::unique_ptr<RndObject>> mSharedObjects;
529 std::map<String, PanelFactory> mPanelFactories;
530 std::map<String, ScreenFactory> mScreenFactories;
531 std::map<String, StyleFactory> mStyleFactories;
532 std::map<String, ComponentFactory> mComponentFactories;
547 static float RepeatDelay(
int nCount);
555 static float sFirstRepeatDelay;
563 static float sRepeatDelay;
Reference-counted array of script data nodes.
Definition dataarray.h:20
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Receiver of engine messages.
Definition msgsink.h:21
MsgSource()
Construct a source with no sinks.
Interface a loader consults before it creates each object of its file.
Definition rndloader.h:35
Base of every object the renderer can load, resolve by name, and serialise.
Definition rndobject.h:20
Ordering of C strings by their text, for maps keyed by name.
Definition strless.h:10
Growable text buffer that is also a PrnStream.
Definition string.h:19
One control of a front-end panel, such as a label, a button, or a list.
Definition uicomponent.h:21
void Report()
Report the objects the loads skipped without permission.
Callback(DataArray *pConfig)
Construct a callback.
~Callback() override
Destroy the callback.
Definition uimanager.h:64
int ShouldLoad(RndObject *pExisting, const char *pszName, const char *pszClass) override
Create an object only when no object of the name exists.
Owner of every front-end screen, panel, and style, and of the screen that shows.
Definition uimanager.h:36
UIScreen * GetCurrentScreen() const
Definition uimanager.h:505
void RegisterPanelType(PanelFactory pfnFactory, const char *pszType)
Register a panel type.
UIScreen *(* ScreenFactory)(DataArray *pData)
Routine that creates a screen from its script description.
Definition uimanager.h:109
UIComponent *(* ComponentFactory)(DataArray *pData, const char *pszDir)
Routine that creates a component from its script description.
Definition uimanager.h:126
float GetTime() const
Definition uimanager.h:510
bool IsNavigationMsg(Message *pMsg)
Report whether a message is a controller button or a keyboard key.
void Init()
Read the ui section of the configuration, load the shared .rnd files, and register the built-in panel...
void Poll(float fTime)
Advance the current screen to a time, and send the repeat of a held directional button.
UIManager()
Construct an empty manager.
void UnloadGroup(const char *pszGroup)
Unload the panels of every screen of a loading group.
UIStyle * FindStyle(const char *pszName, bool bFail)
Find a style by name.
void LoadGroup(const char *pszGroup)
Load the panels of every screen of a loading group.
UIPanel * FocusPanel()
Report the panel with the focus on the current screen.
void SetCurrentScreen(UIScreen *pScreen)
Record the current screen.
UIComponent * CreateComponent(DataArray *pData, const char *pszDir)
Create a component through the factory registered for its entry type.
void AddScreen(UIScreen *pScreen)
Register a screen under its name.
void RegisterScreenType(ScreenFactory pfnFactory, const char *pszType)
Register a screen type.
void LoadFile(const char *pszFile, bool bLoadAll)
Read a front-end description and create what it describes.
void GotoScreen(UIScreen *pScreen)
Change to a screen.
UIComponent * FindComponent(const char *pszPanel, const char *pszComponent, bool bFail)
Find a component of a panel by name.
bool DispatchPriv(Message *pMsg) override
Track the directional buttons for the repeat.
UIPanel * CreatePanel(DataArray *pData, const char *pszDir)
Create a panel through the factory registered for its entry type.
void GotoScreen(const char *pszName)
Change to the screen of a name.
UIPanel * FindPanel(const char *pszName, bool bFail)
Find a panel by name.
void Terminate()
Destroy every style, screen, panel, and shared object.
void RegisterComponentType(ComponentFactory pfnFactory, const char *pszType)
Register a component type.
UIPanel *(* PanelFactory)(DataArray *pData, const char *pszDir)
Routine that creates a panel from its script description.
Definition uimanager.h:101
void AddStyle(UIStyle *pStyle)
Register a style under its name.
UIStyle * CreateStyle(DataArray *pData)
Create a style through the factory registered for its entry type.
bool IsGroupLoaded(const char *pszGroup)
Report whether every screen of a loading group has loaded.
void AddPanel(UIPanel *pPanel)
Register a panel under its name.
int GetEditMode() const
Definition uimanager.h:515
void VerifyGroup(const char **ppszGroup)
Check a loading group against the allowable_groups of the configuration.
void RegisterStyleType(StyleFactory pfnFactory, const char *pszType)
Register a style type.
UIScreen * CreateScreen(DataArray *pData)
Create a screen through the factory registered for its entry type.
UIScreen * FindScreen(const char *pszName, bool bFail)
Find a screen by name.
void ReportLocalizeErrors()
Report the localisation errors the panels recorded while their texts loaded.
~UIManager() override
Destroy the manager.
__attribute__((noinline)) bool HandleJoypad(JoypadInputMsg *pMsg)
Start or stop the repeat of a directional button.
void Draw()
Draw the current screen.
UIStyle *(* StyleFactory)(DataArray *pData)
Routine that creates a style from its script description.
Definition uimanager.h:117
bool Dispatch(Message *pMsg) override
Offer a message to the sinks, then to the manager, then to the current screen.
Group of components drawn from one .rnd file, which a screen shows.
Definition uipanel.h:35
One front-end screen, a set of panels shown together with one panel holding the focus.
Definition uiscreen.h:35
Material and font a component draws with in each of its states.
Definition uistyle.h:15
UIManager TheUI
The front-end manager.