This class holds all information related to the user interface of a palette.
- static const static uint32_t TYPE
- void Load(PaletteMain* pPalette, IWindow* pWindow, bool, PaletteInfo* pInfo)
- The UI is generated in the following steps:
- void Unload()
- void Update(int msTime)
- auto AddRef() -> int override
- auto Release() -> int override
- auto Cast(uint32_t) const -> void* override
- auto GetEventFlags() const -> int override
- Gets the flags that represent which type of messages this IWinProc can handle.
- auto HandleUIMessage(IWindow* pWindow, const Message& message) -> bool override
- Method called every time a message is received on a window that has this IWinProc added.
- UILayoutPtr mpLayout
- The layout of the palette, loaded using the ID in Palettes::
- IWindow* mpCategoryButtonsWindow
- The window that contains the category selection buttons.
- IWindow* field_14
- IWindow* field_18
- IWindow* field_1C
- SporeAnimatedIconWin* mpAnimatedWindow
- IWindow* mpCategoryContent
- The window that is used to display the category content (e.g. its pages)
- IWindow* mpMainWindow
- The main window of the UILayout, with ControlID 0xFFFFFFFF.
- PaletteMainPtr mpPalette
- The Palettes::
PaletteMain that this UI displays.
- PaletteInfoPtr mpPaletteInfo
- vector<PaletteCategoryUIPtr> mCategories
- The UI objects for all categories contained in the palette. They are in the same order as the PaletteMain::
- vector<int> field_48
- int field_5C
- int field_60
- int field_64
- bool field_68
- bool field_69
The ControlID and CommandID of the left arrow button that changes the categories displayed.
The ControlID and CommandID of the right arrow button that changes the categories displayed.
The ControlID of the window that contains the category selection buttons.
The ControlID of the window that is used to display the category content (e.g. its pages)
PaletteUI:: Load(PaletteMain* pPalette,
The UI is generated in the following steps:
- The UILayout of the palette is loaded; it's parent is set to pWindow using the UTFWin::
UILayout:: SetParentWindow() method.
- The mpMainWindow is set to the window with ControlID 0xFFFFFFFF; if it exists, the method IWindow::
FitParentArea() will be called.
- The mAnimatedWindow is set to the window with ControlID 0x49AFE6A1, and it is set invisible.
- This object is added as a IWinProc in the windows with ControlID: kControlLeftArrowBtn, kControlRightArrowBtn and 0x7BCE6E8
PaletteUI:: GetEventFlags() const override
Gets the flags that represent which type of messages this IWinProc can handle.
This allows for better performance, since generally a procedure only needs to listen specific events. The flags are in the kEventFlag... values.
PaletteUI:: HandleUIMessage(IWindow* pWindow,
const Message& message) override
Method called every time a message is received on a window that has this IWinProc added.
|pWindow||The window that received this message.|
|message||The message received.|
|Returns||Whether the message was handled or not.|
This method is responsible of handling (or not) the message. This method receives the IWindow that is currently receiving the message; this way, the same IWinProc can be listening for more than one window. This method returns whether the message was handled or not; if it was handled, no other IWinProcs will be called on that window.