MrxGuiCinematicLayout
Module: mrxguicinematiclayout.lua
Overview
MrxGuiCinematicLayout is the data-only layout companion to MrxGuiCinematic: it declares the widget tree for the full-screen cinematic overlay (the black background, the movie/still-image surface, the caption text, and the subtitle/supersubtitle bands) as a plain Lua table, then loads them into the GUI. All actual behavior lives in mrxguicinematic.lua; this file just wires two of those functions to widget initialization.
Inheritance
- Inherits from:
noneβ data/layout module - Imports:
MrxGuiCinematic,MrxGuiBase(guarded byif import thenso the table can also be loaded by an offline tool whereimportis absent β in that caseMrxGuiCinematicis stubbed to{})
Instance pattern
Stateless. The only state is two module-level globals: LocalWidgetList (the static layout definition) and AddedWidgetList (the live widget handles created by the last ReInit). Note AddedWidgetList is a global, not a local β ReInit reads it before assigning it, so it relies on a prior loader having created it.
The widget tree (LocalWidgetList)
One root widget, "Cinematic Placeholder" (640Γ480, center-anchored), with six children in this order β the indices matter because mrxguicinematic.lua grabs children by number (tChildren[1], [5], [6], β¦):
- placeholder black bg β full-screen black
image(fade backdrop). - placeholder image β the still-picture
imagesurface (Showsets its texture;ShowMoviehides it and plays a movie in its place). - placeholder text β caption
text, fontenglish_18, bottom-anchored. - continue β the β[confirm]β prompt
text(localized token[confirm] [0x46f1bb15]). - Movie subtitle β bottom subtitle band; binds
GuiInitialization β MrxGuiCinematic._InitializeSubtitleBuffer. - Movie supersubtitle β top subtitle band (used for
bSuperlines).
The rootβs EventHandlers.GuiInitialization is bound to MrxGuiCinematic._HandleInitializationEvent, which is what turns this static tree into the working overlay (adds the MovieWidget, aliases Show/Hide/ShowMovie onto the widget, sets up animation points). Fonts are english_18 throughout; changing coordinates here moves the corresponding element on screen.
Functions
ReInit()
The only function in the file. Removes every widget currently in AddedWidgetList (via MrxGuiBase.RemoveWidget), resets that table, then re-loads each entry of LocalWidgetList with MrxGuiBase.LoadAndAddWidgetFromLayoutFileData(...), repopulating AddedWidgetList. Call it to hot-reload the cinematic layout after editing LocalWidgetList.
Events
No Event.Create/Event.* engine-event references appear in this file. The LocalWidgetList table wires two widgetsβ EventHandlers.GuiInitialization key directly to functions from the imported MrxGuiCinematic module (MrxGuiCinematic._HandleInitializationEvent on the root widget, MrxGuiCinematic._InitializeSubtitleBuffer on the βMovie subtitleβ child) β these are Scaleform/widget-level event handler names (dispatched by the GUI system when a widget initializes), not Event.* engine constants, and the handler functions themselves live in mrxguicinematic.lua, not this file.
Notes for modders
- Child order is load-bearing.
mrxguicinematic.luaaddresses children by numeric index (subtitle is child 5, supersubtitle child 6, movie surface is added at runtime). Reordering or inserting entries inLocalWidgetList[1].Childrenwill silently rewire the wrong widgets. - This is where you move/resize the caption and subtitle bands β edit the
x1/y1/x2/y2and anchors on the relevant child, thenReInit(). Behavior (timing, fades) is not here; thatβs MrxGuiCinematic. EventHandlersvalues are function references,EventHandlerNamesare the string names the GUI system stores; both must be kept in sync if you rebind a handler.- The visible strings (
"Cinematic placeholder text.", the[confirm] [0x46f1bb15]token) are placeholders/localization tokens, not final on-screen copy.