Welcome, Guest Friday 25th April 2014, 03:35:26
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: ION_DialogShowModal  (Read 1443 times)
0 Members and 1 Guest are viewing this topic.
i0n0s
Moderator
*****
Offline Offline



« Reply #15 on: 10 May 2009, 18:52:59 »

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 Cheesy

The parameters have changed. And I've added a context menu.
An example is not included, but here is example code from the RTE:
Code:
//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}]
];

Code:
["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;
Logged
Pages: 1 [2]  All   Go Up
  Send this topicPrint  
 
Jump to: