⚠️ Not yet verified in-game — this page was drafted from source analysis and hasn't been confirmed by actually running it. Treat it as a strong draft, not gospel.
MrxGuiAttractLayout
Module: mrxguiattractlayout.lua
Overview
The MrxGuiAttractLayout module defines the layout and initialization of a GUI attract mode screen. It sets up a widget list containing a main container with an image background, and provides functionality to reinitialize the GUI by removing and reloading widgets.
Inheritance
- Inherits from: none — base/utility module
- Imports:
MrxGuiAttractMode,MrxGuiBase
Instance pattern
This is a stateless manager/utility module. It does not track per-instance state but manages global GUI widget lists.
Functions
ReInit()
Reinitializes the GUI by removing all added widgets and reloading them from the local widget list. This function is used to refresh or reset the attract mode screen.
Events
- Listens for custom event
GuiInitializationto callMrxGuiAttractMode.HandleInitwhen initializing the GUI.
Notes for modders
- Ensure that
ReInitis called appropriately to manage the lifecycle of the GUI widgets. - Customize the widget properties by modifying the
LocalWidgetListtable before callingReInit. - Be aware that the module imports
MrxGuiAttractModeandMrxGuiBase, so any modifications to these modules may affect this layout.