<?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%3ADialog_Configuration_Tutorial</id>
	<title>Arma Reforger:Dialog Configuration Tutorial - 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%3ADialog_Configuration_Tutorial"/>
	<link rel="alternate" type="text/html" href="https://community.bistudio.com/wiki?title=Arma_Reforger:Dialog_Configuration_Tutorial&amp;action=history"/>
	<updated>2026-04-18T20:21:32Z</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:Dialog_Configuration_Tutorial&amp;diff=370696&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:Dialog_Configuration_Tutorial&amp;diff=370696&amp;oldid=prev"/>
		<updated>2025-01-23T16:54:11Z</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|side}}&lt;br /&gt;
The Configurable Dialog system allows to easily make a custom dialog given a config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dialog Creation ==&lt;br /&gt;
&lt;br /&gt;
* Make a layout if needed.&lt;br /&gt;
* Inherit from {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}} for a custom dialog handler, if needed.&lt;br /&gt;
* Make a {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiPresets}} config file or choose an existing one.&lt;br /&gt;
* Add entries of {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiPreset}} in the config: these are your dialogs. Give them exclusive tags within the config file that holds them.&lt;br /&gt;
* In scripts, when you want to spawn a dialog, you need to:&lt;br /&gt;
** Instantiate the custom handler (if created)&lt;br /&gt;
** Call the static method &amp;lt;enforce inline&amp;gt;SCR_ConfigurableDialogUi.CreateFromPreset()&amp;lt;/enforce&amp;gt;. The parameters you need to provide are:&lt;br /&gt;
*** '''presetsResourceName''': ResourceName (GUID) of the config file that holds the dialog preset.&lt;br /&gt;
*** '''tag''': unique identifier string to target the dialog to be spawned.&lt;br /&gt;
*** '''customDialogObj''': optional handler class inheriting from {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}} - if not provided the base SCR_ConfigurableDialogUi will be used instead.&lt;br /&gt;
The &amp;lt;enforce inline&amp;gt;CreateFromPreset()&amp;lt;/enforce&amp;gt; method returns the instance of the dialog handler that has been made for the newly spawned dialog, so you can cast to your custom handler type to perform further operations.&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
&lt;br /&gt;
{{armaR}} generally uses three layouts: {{hl|ConfigurableDialog}}, {{hl|ConfigurableDialog_Medium}}, {{hl|ConfigurableDialog_Big}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure is:&lt;br /&gt;
* a Size widget that defines the dimensions of the whole dialog&lt;br /&gt;
* a Header with title and icon&lt;br /&gt;
* a Message text&lt;br /&gt;
* a Content area&lt;br /&gt;
* a Footer for the buttons.&lt;br /&gt;
&lt;br /&gt;
The content of complex dialogs should be its own layout, which the system will dynamically add to the base.&lt;br /&gt;
&lt;br /&gt;
Still, nothing stops anyone from creating their own &amp;quot;complete&amp;quot; layout by inheriting from one of the bases and filling the {{hl|ContentLayoutContainer}} widget manually with whatever needed content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is recommended to have the content be its own layout; however for ease of maintenance, future changes to the base hierarchy might cause the loss of content that is not protected in its own prefab layout.&lt;br /&gt;
Same goes with buttons: they either get added through the {{hl|.conf}} files or in the manually created layout.&lt;br /&gt;
&lt;br /&gt;
=== SCR_ConfigurableDialogUi ===&lt;br /&gt;
&lt;br /&gt;
The base dialog handler is a {{Link/Enfusion|armaR|ScriptedWidgetComponent}} that will be instantiated by the dialog creation process and attached to the dialog layout.&lt;br /&gt;
&lt;br /&gt;
It provides handling of the Title, Message, Content and Footer as defined in the presets, and includes methods and invokers for confirming, canceling and closing.&lt;br /&gt;
&lt;br /&gt;
The dialog itself is technically a menu,, since the Configurable layout is inserted into a proxy menu created with the enfusion Menu Manager, and thus has also access to menu events.&lt;br /&gt;
&lt;br /&gt;
By inheriting from {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}} you can freely extend its functionality.&lt;br /&gt;
&lt;br /&gt;
=== SCR_ConfigurableDialogUiPresets ===&lt;br /&gt;
&lt;br /&gt;
These config files allow us to spread the large amount of dialogs needed by the game into multiple, smaller lists.&lt;br /&gt;
&lt;br /&gt;
This avoids unnecessary clutter in chimeraMenus.conf, and allows to organize dialogs in their own .confs and scripts.&lt;br /&gt;
&lt;br /&gt;
A dialog config file can contain multiple presets, identified by tag. The standard Configurable dialog preset should already have all the attributes necessary for your dialog, but you can always inherit from {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiPreset}} and extend it.&lt;br /&gt;
&lt;br /&gt;
'''The Tag is used to know which dialog to create'''. As such, you need unique tags in a single {{hl|.conf}} file.&lt;br /&gt;
&lt;br /&gt;
The system will assemble the dialog, adding the content and buttons to the base.&lt;br /&gt;
&lt;br /&gt;
It is possible to create prefab {{hl|.conf}} files for single dialogs and buttons, and then use those in the general dialog {{hl|.conf}} files.&lt;br /&gt;
An example is {{Link|enfusion://ResourceManager/~ArmaReforger:Configs/ConfigurableDialogs/DialogPrefabs/MessageOkCancel.conf}}.&lt;br /&gt;
&lt;br /&gt;
=== Related Classes ===&lt;br /&gt;
&lt;br /&gt;
==== Configuration Classes ====&lt;br /&gt;
* {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiPresets}} - collection of dialog presets. This is a config root.&lt;br /&gt;
* {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiPreset}} - class of one preset configuration. A preset contains some properties of a dialog (dialog tag, style, message, title, buttons configuration)&lt;br /&gt;
* {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiButtonPreset}} - class of one button configuration (button tag, name, label, alignment).&lt;br /&gt;
&lt;br /&gt;
==== Main Classes ====&lt;br /&gt;
* {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}} - the main class which represents a configurable dialog. You can override some methods in inherited classes for custom functionality. This class inherits from {{Link/Enfusion|armaR|ScriptedWidgetComponent}}, and in the end gets attached to the dialog's root widget as a component. There are several ways to attach it to the widget:&lt;br /&gt;
*# call &amp;lt;enforce inline&amp;gt;CreateByPreset()&amp;lt;/enforce&amp;gt; with customDialogObj left null. In this case the system creates a new &amp;lt;enforce inline&amp;gt;SCR_ConfigurableDialogUi&amp;lt;/enforce&amp;gt; object and attaches it to the widget.&lt;br /&gt;
*# call &amp;lt;enforce inline&amp;gt;CreateByPreset()&amp;lt;/enforce&amp;gt; and provide it with a customDialogObj, in this case the provided object will be attached to the widget.&lt;br /&gt;
*# attach a {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}}-inherited object directly to the layout's root widget, in the layout file.&lt;br /&gt;
* {{Link/Enfusion|armaR|SCR_ConfigurableDialogUiProxy}} - this is the parent menu which holds the actual dialog widgets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initialisation Sequence ==&lt;br /&gt;
&lt;br /&gt;
The whole dialog creation and initialisation sequence is done in &amp;lt;enforce inline&amp;gt;SCR_ConfigurableDialogUi.CreateFromPreset()&amp;lt;/enforce&amp;gt; and &amp;lt;enforce inline&amp;gt;CreateByPreset&amp;lt;/enforce&amp;gt; methods.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;enforce inline&amp;gt;CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj = null)&amp;lt;/enforce&amp;gt; is called.&lt;br /&gt;
* the config file provided in presetsResourceName is loaded, the preset object is found by tag.&lt;br /&gt;
* the proxy dialog in game's MenuManager is created.&lt;br /&gt;
* the actual dialog widgets are created inside proxy dialog's root widget. The actual dialog layout is taken from preset's {{hl|m_sLayout}} property.&lt;br /&gt;
* a new {{hl|customDialogObj}} is created and attached to the dialog's root, or the provided {{hl|customDialogObj}} is used, or the one which is already attached to the layout.&lt;br /&gt;
* &amp;lt;enforce inline&amp;gt;Dialog.Init&amp;lt;/enforce&amp;gt; is called - here we apply title, message, add buttons.&lt;br /&gt;
* &amp;lt;enforce inline&amp;gt;Dialog.OnMenuOpen&amp;lt;/enforce&amp;gt; is called - here we expect derived class to perform the custom initialisation, if needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Basic Usage ===&lt;br /&gt;
&lt;br /&gt;
We create a simple dialog with message. If we want to do something when a button is pressed, we can subscribe to one of the available events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
const ResourceName DIALOGS_CONFIG = &amp;quot;{814FCA3CB7851F6B}Configs/Dialogs/CommonDialogs.conf&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
SCR_ConfigurableDialogUi dialog = SCR_ConfigurableDialogUi.CreateFromPreset(DIALOGS_CONFIG, &amp;quot;timeout_ok&amp;quot;); // &amp;quot;timeout_ok&amp;quot; is the Tag property&lt;br /&gt;
&lt;br /&gt;
// we can execute our code when dialog is closed&lt;br /&gt;
// useful for a common dialog which is called from many places,&lt;br /&gt;
// but in each place we want to run different code on dialog closure&lt;br /&gt;
dialog.m_OnClose.Insert(OnDialogClose);&lt;br /&gt;
&lt;br /&gt;
// we can also use m_OnConfirm or m_OnCancel events&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Standard Usage ===&lt;br /&gt;
&lt;br /&gt;
The dialog has some code associated only with itself, and we want that code to run regardless from where the dialog was invoked.&lt;br /&gt;
&lt;br /&gt;
The takeaway here is the call signature of &amp;lt;enforce inline&amp;gt;CreateFromPreset&amp;lt;/enforce&amp;gt;:&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
static SCR_ConfigurableDialogUi CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj = null)&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the last argument is {{hl|customDialogObj}}, which lets us tie an object to a dialog if needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
class SCR_ExitGameWhileDownloadingDialog : SCR_ConfigurableDialogUi&lt;br /&gt;
{&lt;br /&gt;
	//---------------------------------------------------------------------------------------------&lt;br /&gt;
	void SCR_ExitGameWhileDownloadingDialog()&lt;br /&gt;
	{&lt;br /&gt;
		// note that we pass 'this' into CreateFromPreset call!&lt;br /&gt;
		SCR_ConfigurableDialogUi.CreateFromPreset(SCR_CommonDialogs.DIALOGS_CONFIG, &amp;quot;exit_game_while_downloading&amp;quot;, this);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//---------------------------------------------------------------------------------------------&lt;br /&gt;
	override void OnConfirm()&lt;br /&gt;
	{&lt;br /&gt;
		// try to terminate all current downloads&lt;br /&gt;
		SCR_DownloadManager dlManager = SCR_DownloadManager.GetInstance();&lt;br /&gt;
		if (dlManager)&lt;br /&gt;
				dlManager.EndAllDownloads();&lt;br /&gt;
&lt;br /&gt;
		// exit the game&lt;br /&gt;
		GetGame().RequestClose();&lt;br /&gt;
		SCR_AllFilterSetsStorage.ResetAllToDefault();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void SomeOtherMethod()&lt;br /&gt;
{&lt;br /&gt;
	new SCR_ExitGameWhileDownloadingDialog();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Parameterised Usage ===&lt;br /&gt;
&lt;br /&gt;
We can also provide the message procedurally, but it is a bit of a hassle to inject the data into dialog initialisation sequence.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
//! there is not enough storage on your hard drive. The space required is at least %1.&lt;br /&gt;
class SCR_NotEnoughStorageDialog : SCR_ConfigurableDialogUi&lt;br /&gt;
{&lt;br /&gt;
	protected float m_fSizeBytes;&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	static SCR_NotEnoughStorageDialog Create(float sizeBytes)&lt;br /&gt;
	{&lt;br /&gt;
		SCR_NotEnoughStorageDialog dialog = new SCR_NotEnoughStorageDialog(sizeBytes);&lt;br /&gt;
&lt;br /&gt;
		SCR_ConfigurableDialogUi.CreateFromPreset(&lt;br /&gt;
			SCR_CommonDialogs.DIALOGS_CONFIG,&lt;br /&gt;
			&amp;quot;error_not_enough_storage&amp;quot;,&lt;br /&gt;
			dialog); // also note that we provide dialog to CreateFromPreset&lt;br /&gt;
&lt;br /&gt;
		return dialog;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	// Inside OnMenuOpen we can set custom message&lt;br /&gt;
	override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)&lt;br /&gt;
	{&lt;br /&gt;
		// The idea is that if possible, formatting of data should be performed by dialog class&lt;br /&gt;
		string sizeStr = SCR_ByteFormat.GetReadableSize(m_fSizeBytes);&lt;br /&gt;
		string messageStr = WidgetManager.Translate(preset.m_sMessage, sizeStr);&lt;br /&gt;
		this.SetMessage(messageStr);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	void SCR_NotEnoughStorageDialog(float sizeBytes)&lt;br /&gt;
	{&lt;br /&gt;
		// the idea is to store m_fSizeBytes and use it when OnMenuOpen is called&lt;br /&gt;
		m_fSizeBytes = sizeBytes;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void SomeOtherMethod()&lt;br /&gt;
{&lt;br /&gt;
	SCR_NotEnoughStorageDialog.Create(1024.0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced Usage ===&lt;br /&gt;
&lt;br /&gt;
We can create a dialog's more advanced content&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
class SCR_AddonListDialog : SCR_ConfigurableDialogUi&lt;br /&gt;
{&lt;br /&gt;
	array&amp;lt;ref SCR_WorkshopItem&amp;gt; m_aItems = {};&lt;br /&gt;
	protected ref array&amp;lt;SCR_DownloadManager_AddonDownloadLine&amp;gt; m_aDownloadLines = {};&lt;br /&gt;
&lt;br /&gt;
	protected ResourceName ADDON_LINE_LAYOUT = &amp;quot;{BB5AEDDA3C4134FD}UI/layouts/Menus/ContentBrowser/DownloadManager/DownloadManager_AddonDownloadLineConfirmation.layout&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	void SCR_AddonListDialog(array&amp;lt;ref SCR_WorkshopItem&amp;gt; items, string preset)&lt;br /&gt;
	{&lt;br /&gt;
		foreach (SCR_WorkshopItem i : items)&lt;br /&gt;
		{&lt;br /&gt;
			m_aItems.Insert(i);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (!preset.IsEmpty())&lt;br /&gt;
			SCR_ConfigurableDialogUi.CreateFromPreset(SCR_WorkshopUiCommon.DIALOGS_CONFIG, preset, this);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//------------------------------------------------------------------------------------------------&lt;br /&gt;
	override void OnMenuOpen(SCR_ConfigurableDialogUiPreset preset)&lt;br /&gt;
	{&lt;br /&gt;
		VerticalLayoutWidget layout = VerticalLayoutWidget.Cast(GetRootWidget().FindAnyWidget(&amp;quot;AddonList&amp;quot;)); // the widget we have added&lt;br /&gt;
		WorkspaceWidget workspace = getGame().GetWorkspace();&lt;br /&gt;
&lt;br /&gt;
		// Create a line for each entry in m_aItems&lt;br /&gt;
		Widget w;&lt;br /&gt;
		SCR_DownloadManager_AddonDownloadLine comp;&lt;br /&gt;
		foreach (SCR_WorkshopItem item : m_aItems)&lt;br /&gt;
		{&lt;br /&gt;
			w = workspace.CreateWidgets(ADDON_LINE_LAYOUT, layout);&lt;br /&gt;
&lt;br /&gt;
			component = SCR_DownloadManager_AddonDownloadLine.Cast(w.FindHandler(SCR_DownloadManager_AddonDownloadLine));&lt;br /&gt;
			component.InitForWorkshopItem(item, string.Empty, false);&lt;br /&gt;
&lt;br /&gt;
			m_aDownloadLines.Insert(component);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Common ConfigurableDialog ===&lt;br /&gt;
&lt;br /&gt;
# Game exit popup - MainMenuUI:&amp;lt;br&amp;gt;Binds the OnBack function to the &amp;quot;Back&amp;quot; button click&amp;lt;enforce&amp;gt;&lt;br /&gt;
// subscribe to buttons&lt;br /&gt;
SCR_InputButtonComponent back = SCR_InputButtonComponent.GetInputButtonComponent(&amp;quot;Back&amp;quot;, footer);&lt;br /&gt;
if (back)&lt;br /&gt;
	back.m_OnActivated.Insert(OnBack);&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
# &amp;lt;enforce inline&amp;gt;OnBack()&amp;lt;/enforce&amp;gt; calls &amp;lt;enforce inline&amp;gt;TryExitGame()&amp;lt;/enforce&amp;gt;:&amp;lt;enforce&amp;gt;&lt;br /&gt;
protected static void TryExitGame()&lt;br /&gt;
{&lt;br /&gt;
	int numCompleted, numTotal;&lt;br /&gt;
	SCR_DownloadManager dlManager = SCR_DownloadManager.GetInstance();&lt;br /&gt;
	if (dlManager)&lt;br /&gt;
		dlManager.GetDownloadQueueState(numCompleted, numTotal);&lt;br /&gt;
&lt;br /&gt;
	if (numTotal &amp;gt; 0)&lt;br /&gt;
		new SCR_ExitGameWhileDownloadingDialog();&lt;br /&gt;
	else&lt;br /&gt;
		new SCR_ExitGameDialog();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
# {{Link/Enfusion|armaR|SCR_ExitGameWhileDownloadingDialog}} and {{Link/Enfusion|armaR|SCR_ExitGameDialog}} are defined in {{hl|CommonDialogs.c}}, they inherit from {{Link/Enfusion|armaR|SCR_ConfigurableDialogUi}}.&amp;lt;enforce&amp;gt;&lt;br /&gt;
class SCR_ExitGameDialog : SCR_ConfigurableDialogUi&lt;br /&gt;
{&lt;br /&gt;
	//---------------------------------------------------------------------------------------------&lt;br /&gt;
	void SCR_ExitGameDialog()&lt;br /&gt;
	{&lt;br /&gt;
		SCR_ConfigurableDialogUi.CreateFromPreset(SCR_CommonDialogs.DIALOGS_CONFIG, &amp;quot;exit_game&amp;quot;, this);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//---------------------------------------------------------------------------------------------&lt;br /&gt;
	override void OnConfirm()&lt;br /&gt;
	{&lt;br /&gt;
		GetGame().RequestClose();&lt;br /&gt;
		SCR_AllFilterSetsStorage.ResetAllToDefault();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
# DIALOGS_CONFIG is the config file CommonDialogs.conf.&amp;lt;br&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;quot;exit_game&amp;quot; is a tag in CommonDialogs that &amp;lt;enforce inline&amp;gt;CreateFromPreset()&amp;lt;/enforce&amp;gt; uses to find the right preset. &amp;lt;enforce inline&amp;gt;CreateFromPreset()&amp;lt;/enforce&amp;gt; then calls &amp;lt;enforce inline&amp;gt;CreateByPreset()&amp;lt;/enforce&amp;gt; to initialise the dialog and bind events to the buttons. {{Feature|informative|&lt;br /&gt;
The actual widget created is ConfigurableDialogProxy, an empty overlay widget which is referenced in {{hl|chimeraMenus.conf}}, and the new {{hl|ConfigurableDialog}} preset is then created inside it.}}&amp;lt;enforce&amp;gt;&lt;br /&gt;
static SCR_ConfigurableDialogUi CreateByPreset(SCR_ConfigurableDialogUiPreset preset, SCR_ConfigurableDialogUi customDialogObj = null)&lt;br /&gt;
{&lt;br /&gt;
	// Open the proxy dialog&lt;br /&gt;
	SCR_ConfigurableDialogUiProxy proxyComp = SCR_ConfigurableDialogUiProxy.Cast(GetGame().GetMenuManager().OpenDialog(ChimeraMenuPreset.ConfigurableDialog));&lt;br /&gt;
&lt;br /&gt;
	// Create the actual layout inside proxy&lt;br /&gt;
	Widget internalWidget = GetGame().GetWorkspace().CreateWidgets(preset.m_sLayout, proxyComp.GetRootWidget());&lt;br /&gt;
	if (!internalWidget)&lt;br /&gt;
	{&lt;br /&gt;
		Print(string.Format(&amp;quot;[SCR_ConfigurableDialogUi] internalWidget wans't created&amp;quot;), LogLevel.ERROR);&lt;br /&gt;
		return null;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	SCR_ConfigurableDialogUi dialog = SCR_ConfigurableDialogUi.Cast(internalWidget.FindHandler(SCR_ConfigurableDialogUi));&lt;br /&gt;
&lt;br /&gt;
	// Create a new dialog object, or apply the provided one, if the dialog obj was not found in the layout.&lt;br /&gt;
	if (!dialog)&lt;br /&gt;
	{&lt;br /&gt;
		if (customDialogObj)&lt;br /&gt;
			dialog = customDialogObj;&lt;br /&gt;
		else&lt;br /&gt;
			dialog = new SCR_ConfigurableDialogUi();&lt;br /&gt;
&lt;br /&gt;
		dialog.InitAttributedVariables();&lt;br /&gt;
		internalWidget.AddHandler(dialog);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	dialog.Init(internalWidget, preset, proxyComp);&lt;br /&gt;
	proxyComp.Init(dialog);&lt;br /&gt;
&lt;br /&gt;
	// Set action context&lt;br /&gt;
	if (!preset.m_sActionContext.IsEmpty())&lt;br /&gt;
		proxyComp.SetActionContext(preset.m_sActionContext);&lt;br /&gt;
&lt;br /&gt;
	// Call dialog's events manually&lt;br /&gt;
	dialog.OnMenuOpen(preset);&lt;br /&gt;
&lt;br /&gt;
	return dialog;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing the content layout ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;enforce&amp;gt;&lt;br /&gt;
VerticalLayoutWidget layout = VerticalLayoutWidget.Cast(GetContentLayoutRoot(GetRootWidget()).FindAnyWidget(&amp;quot;AddonList&amp;quot;));&lt;br /&gt;
&amp;lt;/enforce&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;enforce inline&amp;gt;SCR_ConfigurableDialogUi.GetContentLayoutRoot()&amp;lt;/enforce&amp;gt; will return the first widget of the content layout. Useful for those dynamically generated dialogs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{GameCategory|armaR|Modding|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Lou Montana</name></author>
	</entry>
</feed>