Page MenuHomeFeedback Tracker

Expand ctrlCreate to take CONFIG as argument for control config definition
Closed, ResolvedPublic

Description

I want to request expansion of ctrlCreate command to allow passing of CONFIG types instead of STRING class so we can create controls from insides of existing UI config structures. Having to define createable controls outside of destination display config is inconvenient because you want to group your createable controls alongside the display they will be used in. It is somewhat bearable in case of displays because you can include one fine and define both createable controls and display alongside each other, but becomes an issue when displays are inside RscTitles, you have to have 2 separate files describing the title display and its createable controls. Example of an inconvenience:

#include "my_title_display_ctrlCreate_stuff.hpp"
class RscTitles {
	#include "my_title_display.hpp";
};

With this feature you'd be able to define createable controls in display itself, in custom class or already existing in its intended place in display controls:

class MyTitleDisplay {
	idd = 123;
	...
	class Controls {
		class ControlWeCopyWithCtrlCreate:RscWhatever {...};
	};

	class ControlsToolbox {
		class ControlWeUseInCtrlCreate:RscWhatever {...};
	};
};

and then do:

_ctrl_copy = _display ctrlCreate [missionConfigFile >> "RscTitles " >> "MyTitleDisplay" >> "Controls" >> "ControlWeCopyWithCtrlCreate", -1];
_ctrl_new = _display ctrlCreate [missionConfigFile >> "RscTitles " >> "MyTitleDisplay" >> "ControlsToolbox" >> "ControlWeUseInCtrlCreate", -1];

Details

Severity
Feature
Resolution
Fixed
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Additional Information

Example usage with existing A3 display control:

findDisplay 46 ctrlCreate [configFile >> "RscDisplayBootcampMsgBox" >> "controls" >> "BootcampMessageBox", -1];

Event Timeline

SaMatra created this task.Feb 28 2023, 2:40 PM
This comment was removed by LouMontana.
This comment was removed by BIS_fnc_KK.

Revision: 150352

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Mar 18 2023, 10:06 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
dedmen set Ref Ticket to AIII-55614.Mar 20 2023, 11:59 AM

Did some tests, works great!

BIS_fnc_KK closed this task as Resolved.Mar 31 2023, 9:37 AM
BIS_fnc_KK changed Resolution from Open to Fixed.