Blocking Escape(or your custom key) from closing windows without blocking all other windows or widows under blocked window:
It seems that the escape key only closes windows with a WC_CloseButton (with the exception of the ChatWindows, maybe others)
So to block it rename the close button to something else and change the OnPress to close the window..
I made a map window(Attached) with a togglable escape key blocker..
The steps I took in UI builder are:
1. I renamed WC_CloseButton to Close
2. I moved Close to the WC_Titlebar page (So it disappears with titlebar)
3. I set the OnPress event to:
Code:
Parent.Parent.Visible=false
Escape is now blocked..
To set up the toggle:
1. I added a button named BlockEscOn to WC_Titlebar
2. I set the OnPress to:
Code:
Visible=false
Parent.BlockEscOff.Visible=true
Parent.Close.IsCancelButton=false
3. Set BlockEscOff.Visible=true
4. I added a button named BlockEscOff to WC_Titlebar and lined it up with BlockEscOn
5. I set the OnPress to:
Code:
Visible=false
Parent.BlockEscOn.Visible=true
Parent.Close.IsCancelButton=true
6. Set BlockEscOn.Visible=false