New version:
2.0 Beta
Changelog:
Merged Draggable into RegisterDialog
Changed parameter for RegisterDisplay
ShowModal has "nowait" parameter for directly return after creating the dialog
Show now adds a dialog to the open dialogs. The previous active dialogs are still active too.
Added context menu
The parameters have changed. And I've added a context menu.
An example is not included, but here is example code from the RTE:
//structure of the context menu array:
_CM_Unit = ["UNIT", //menu identifier
["Edit unit", {
//code which runs after click on the entry
}
],
["Set unit position ...", ["UNIT_POS", //sub menu, structure stays the same
["Up", {}],
["Middle", {}],
["Down", {}],
["Auto", {}]
]],
["Revive unit", {ION_RTE_CM_Unit call ION_RTE_fRevive}],
["Switch to unit", {ION_RTE_CM_Unit call ION_RTE_pSwitchToPlayer}]
];
["Unit", _CM_Unit, {
if (_this select 0 == "UNIT") then { //only in main context menu, not in "UNIT_POS" sub menu
if (alive ION_RTE_CM_Unit) then {
(_this select 3) set [1, 2]; //Hide "Revive Unit"
} else {
(_this select 4) set [1, 1]; //Disable "Switch to Unit"
};
};
_this
}] call ION_DSM_CM_Register;