Jump to content
DanJohn

How to create a drop down dialog

Recommended Posts

I was just wondering if it was possible to create a drop-down dialog like below. The Dialog is from the eden editor and as you can see there aer drop down sections for Music, Sound & Radio Settings and intro text. I really liked the style and was wondering if i was able to recreate it for my own mission.

b4Z7Bwi.jpg

Share this post


Link to post
Share on other sites
38 minutes ago, davidoss said:

https://community.bistudio.com/wiki/Dialog_Control

If you have never done any  i assume you have no idea how much work is to create it and script out such things.

 

 i have read through the wiki and i am still clueless on how i would start creating/coding the drop down dialog menu.

Share this post


Link to post
Share on other sites

do you want it as an extra attribute in the eden editor or ingame?

Share this post


Link to post
Share on other sites

Then you will basically have to script everything. If you're not familiar with ui making and coding you should start with something simple. Following kk''s guide as someone mentioned above is a very good starting point.

Share this post


Link to post
Share on other sites

RscCombo is what you need. Example:

_display = (findDisplay 46) createDisplay "RscDisplayEmpty";

_dropdown = _display ctrlCreate ["RscCombo", 100];
_dropdown ctrlSetPosition [0, 0, 1, 0.04];
_dropdown ctrlCommit 0;

{
	_item = _dropdown lbAdd format ["Item %1 - %2", (_forEachIndex + 1), _x];
	_dropdown lbSetData [_item, _x];
} forEach ["Apple", "Banana", "Pear", "Orange"];

_dropdown ctrlAddEventHandler ["LBSelChanged",
{
	params ["_control", "_selectedIndex"];
	hintSilent format ["Item selected: %1", _control lbData (lbCurSel _control)];
}];

Tested in debug console.

  • Like 1

Share this post


Link to post
Share on other sites

 

hello everyone and a pleasure to follow your posts, if possible I wanted to ask you experts, how can I use the script above to allow when I select "apple, pear, peach, banana" to assign each one a command? Thanks in advance

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×