Resource Manager: Generate Class From Layout Plugin – Arma Reforger

From Bohemia Interactive Community
Revision as of 15:09, 3 October 2024 by Lou Montana (talk | contribs) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Generate Class from Layout

Resource Manager plugin

Create a script file with member variables pointing to main widgets

File: SCR_GenerateLayoutClassPlugin.c

This plugin generates a scripted class with variables for widgets and code to find widgets by their name. It also generates code to find all widget components.


Usage

  • Open the layout to be exported to script
  • Use Plugins > Generate Class from Layout
  • Confirm the displayed window using the Generate button

The layout needs:

  • to be opened in Resource Manager and its tab focused
  • to carry a SCR_WidgetExportRuleRoot
  • widgets to be exported in script names prefixed with m_ (ideally m_w by convention - widget variables will begin with the m_w prefix anyway)


Example Output

(Used on StatsPanel.layout)