Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
gooses89

Help with a Dialog

Recommended Posts

I have been working on a custom Dialog that will pop up when people join the server.

I have a button that I want people to have to press to be able to close it.

As it stands you can just hit Escape to close the dialog, is there anyway to get rid of that, so people HAVE to hit the button to close it?

Thanks

Share this post


Link to post
Share on other sites

You want to add one of these event handlers to the UI https://community.bistudio.com/wiki/User_Interface_Event_Handlers Then you can close it with: closeDialog 0;

Example:

class BW_Arty_NO: RscShortcutButton
{
idc = 1701;
text = "Exit Menu"; //--- ToDo: Localize;
x = 0.595625 * safezoneW + safezoneX;
y = 0.806 * safezoneH + safezoneY;
w = 0.103594 * safezoneW;
h = 0.085 * safezoneH;
onButtonClick = "closeDialog 0;";
};

Share this post


Link to post
Share on other sites

I already have a working close dialog button but I want to stop people from being able to exit out using the Esc key on their keyboard

Share this post


Link to post
Share on other sites
Sign in to follow this  

×