MrxGuiShellLayout
Module: mrxguishelllayout.lua
Overview
The mrxguishelllayout.lua file is a layout-data file (same shape as mrxguipauselayout.lua) defining a three-level widget tree in LocalWidgetList[1]: a full-screen "Shell" root widget, containing a "Shell Background" image child, which in turn contains a "New Text" text child. It also defines one function, ReInit(), identical in body to the one in mrxguipauselayout.lua, that tears down and reloads the widget set. Imports mrxguishell (event handlers) and MrxGuiBase (widget add/remove API).
Inheritance
- Inherits from:
none β base/utility module(noinherit(...)call) - Imports:
mrxguishell,MrxGuiBase
Instance pattern
Not applicable. No Create/OnActivate/Awake/tInstance β a static nested layout table plus one free function operating on module-level globals:
LocalWidgetList: the static widget-tree definition (root + 2 nested children), built once at load time.AddedWidgetList: populated at runtime byReInit()/MrxGuiBase.LoadAndAddWidgetFromLayoutFileDataβ not initialized anywhere in this file itself (seeReInitnote below).
Functions
ReInit()
Rebuilds the shellβs active widget set: for every entry in AddedWidgetList, calls MrxGuiBase.RemoveWidget(...), resets AddedWidgetList to {}, then for every entry in LocalWidgetList calls MrxGuiBase.LoadAndAddWidgetFromLayoutFileData(LocalWidgetList[i], AddedWidgetList).
Note: as in mrxguipauselayout.lua, AddedWidgetList is never declared in this file before ReInitβs first pairs(AddedWidgetList) call, which would error on a nil table. Whatever external caller invokes ReInit (likely MrxGuiBaseβs widget-management code, which is seen elsewhere setting ModuleName.AddedWidgetList = {} on the modules it manages) must guarantee the table already exists. Not confirmable from this file alone.
Events
No Event.* calls appear in this file. EventHandlers tables wire GUI-system event names to mrxguishell functions at two widget levels:
Root "Shell" widget:
LobbyServerUpdatedβmrxguishell.HandleServerUpdateLobbyServerAddedβmrxguishell.HandleServerAddControllerInputβmrxguishell.HandleInputLobbyServerRemovedβmrxguishell.HandleServerRemoveGuiInitializationβmrxguishell.HandleInitializationEventGuiGameStateChangeβmrxguishell.HandleGameStateChangeEvent
"Shell Background" child widget:
GuiInitializationβmrxguishell.MakeFullscreen
The "New Text" grandchild widget has empty EventHandlerFile/EventHandlers/EventHandlerNames β no handlers.
Widget geometry & constants
"Shell"root: full-screen640Γ480, white (255,255,255,255), center-anchored,visible = 1."Shell Background"child: full-screen640Γ480black (0,0,0,255) image, full UV (0,0β1,1), no texture set in the layout (assigned at runtime) β itβs the black backdrop the shell movie/flash render over."New Text"grandchild:120,390β520,406,font_16, scale1, centered/bottom-anchored, starts empty (text = ""). This is the strip near the bottom of the shell where runtime status text (e.g. the legal/press-space prompt) is shown bymrxguishellhandler code.
Notes for modders
- Actual shell behavior (server list updates, controller input, fullscreen sizing) lives in
mrxguishell, not here β this file only supplies the widget tree and handler-name wiring. ReInit()is a full teardown/rebuild of the widget tree, same caveat asmrxguipauselayout.luaβsReInit.- The
"New Text"widget starts withtext = ""β itβs presumably populated at runtime bymrxguishellhandler code, not visible in this layout file. - The module uses the
MrxGuiBaselibrary to manage widgets, so any modifications should stay compatible with its API.