<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://community.bistudio.com/wiki?action=history&amp;feed=atom&amp;title=Arma_Reforger%3AResource_Manager%3A_Generate_Class_From_Layout_Plugin</id>
	<title>Arma Reforger:Resource Manager: Generate Class From Layout Plugin - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://community.bistudio.com/wiki?action=history&amp;feed=atom&amp;title=Arma_Reforger%3AResource_Manager%3A_Generate_Class_From_Layout_Plugin"/>
	<link rel="alternate" type="text/html" href="https://community.bistudio.com/wiki?title=Arma_Reforger:Resource_Manager:_Generate_Class_From_Layout_Plugin&amp;action=history"/>
	<updated>2026-04-18T15:10:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://community.bistudio.com/wiki?title=Arma_Reforger:Resource_Manager:_Generate_Class_From_Layout_Plugin&amp;diff=369701&amp;oldid=prev</id>
		<title>Lou Montana: Page creation</title>
		<link rel="alternate" type="text/html" href="https://community.bistudio.com/wiki?title=Arma_Reforger:Resource_Manager:_Generate_Class_From_Layout_Plugin&amp;diff=369701&amp;oldid=prev"/>
		<updated>2024-10-03T14:09:54Z</updated>

		<summary type="html">&lt;p&gt;Page creation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{TOC|none}}&lt;br /&gt;
{{Infobox/WorkbenchPlugin&lt;br /&gt;
|name= Generate Class from Layout&lt;br /&gt;
|editor= resource&lt;br /&gt;
|descr= Create a script file with member variables pointing to main widgets&lt;br /&gt;
|file= {{Link|enfusion://ScriptEditor/scripts/WorkbenchGame/ResourceManager/SCR_GenerateLayoutClassPlugin.c}}&lt;br /&gt;
}}&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
* Open the layout to be exported to script&lt;br /&gt;
* Use {{hl|Plugins &amp;gt; Generate Class from Layout}}&lt;br /&gt;
* Confirm the displayed window using the '''Generate''' button&lt;br /&gt;
&lt;br /&gt;
The layout needs:&lt;br /&gt;
* to be opened in Resource Manager and its tab focused&lt;br /&gt;
* to carry a {{Link/Enfusion|armaR|SCR_WidgetExportRuleRoot}} &lt;br /&gt;
* widgets to be exported in script names prefixed with {{hl|m_}} (ideally {{hl|m_w}} by convention - widget variables will begin with the {{hl|m_w}} prefix anyway)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example Output ==&lt;br /&gt;
&lt;br /&gt;
(Used on {{Link|enfusion://ResourceManager/~ArmaReforger:UI/layouts/HUD/StatsPanel/StatsPanel.layout}})&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spoiler text=&amp;quot;Show generated script&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
// Autogenerated by the Generate Class from Layout plugin v0.5.1&lt;br /&gt;
// Layout file: UI/layouts/HUD/StatsPanel/StatsPanel.layout&lt;br /&gt;
class SCR_StatsPanelWidgets&lt;br /&gt;
{&lt;br /&gt;
	protected static const ResourceName LAYOUT = &amp;quot;{0A3C9C22CBDE338F}UI/layouts/HUD/StatsPanel/StatsPanel.layout&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	HorizontalLayoutWidget m_wColorOpacity;&lt;br /&gt;
	ImageWidget m_wIconGlow;&lt;br /&gt;
	ImageWidget m_wIcon;&lt;br /&gt;
	TextWidget m_wLabel;&lt;br /&gt;
	TextWidget m_wTextPlaceholder;&lt;br /&gt;
	TextWidget m_wText;&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	bool Init(notnull Widget root)&lt;br /&gt;
	{&lt;br /&gt;
		m_wColorOpacity = HorizontalLayoutWidget.Cast(root.FindAnyWidget(&amp;quot;m_wColorOpacity&amp;quot;));&lt;br /&gt;
		m_wIconGlow = ImageWidget.Cast(root.FindAnyWidget(&amp;quot;m_wIconGlow&amp;quot;));&lt;br /&gt;
		m_wIcon = ImageWidget.Cast(root.FindAnyWidget(&amp;quot;m_wIcon&amp;quot;));&lt;br /&gt;
		m_wLabel = TextWidget.Cast(root.FindAnyWidget(&amp;quot;m_wLabel&amp;quot;));&lt;br /&gt;
		m_wTextPlaceholder = TextWidget.Cast(root.FindAnyWidget(&amp;quot;m_wTextPlaceholder&amp;quot;));&lt;br /&gt;
		m_wText = TextWidget.Cast(root.FindAnyWidget(&amp;quot;m_wText&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	ResourceName GetLayout()&lt;br /&gt;
	{&lt;br /&gt;
		return LAYOUT;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&amp;lt;/spoiler&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameCategory|armaR|Modding|Official Tools|Resource Manager Plugins}}&lt;/div&gt;</summary>
		<author><name>Lou Montana</name></author>
	</entry>
</feed>