Resource Manager: Generate Class From Layout Plugin – Arma Reforger

From Bohemia Interactive Community
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)