soundblaster 12 Posted April 13, 2016 Hello fellow friends! I am working on a small mission and I want to add custom controls to it. Currently it is working but it opens the menu when you press the button. What I want is that you need to hold the keybinding in order for the menu to keep displaying. Right now when you hold the button it also creates infinite amounts of extra layers of the same dialog. What I got is this: Key_Binding = { switch (_this) do { //Key end case 207: { execVM "Script\earplugs\earplugs.sqf"; }; //Key ~ case 41: { createDialog "CTI_RscMainMenu"; }; }; }; I only want to do this for case 41: Hopefully someone can help me out. Thank you! Share this post Link to post Share on other sites
killzone_kid 1329 Posted April 13, 2016 case 41: { if (!dialog) then {createDialog "CTI_RscMainMenu"}; } Maybe? 1 Share this post Link to post Share on other sites
soundblaster 12 Posted April 13, 2016 case 41: { if (!dialog) then {createDialog "CTI_RscMainMenu"}; } Maybe? Hey, thanks that fixed the endless dialog pop-up, now just the other problem that is that the dialog is only open when the button is being pressed. Thank you! Share this post Link to post Share on other sites
hoverguy 177 Posted April 13, 2016 KeyUp eventhandler and then case 41: { if(!isNull (findDisplay <insert dialog IDD>)) then { closeDialog <insert dialog idd here> }; }; This way when you release the button, dialog closes itself Share this post Link to post Share on other sites