PDA

View Full Version : onEsc{}



Ni3ls
27th November 2014, 18:06
Hi all,

I got a custom menu


{
menuDef
{
name "model"
rect 0 0 640 480
focuscolor GLOBAL_FOCUSED_COLOR
style WINDOW_STYLE_EMPTY
blurWorld 5.0
onEsc
{
scriptmenuresponse "close";
hide "tabline1"
hide "tabline2"
hide "tabline3"
hide "cover1"
hide "cover2"
hide "cover3"
hide "american"
hide "russian"
hide "british"
hide "german"
hide "structured"
hide "special"
hide "special2"
hide "original"
hide "bodies_title1"
hide "heads_title1"
hide "helmets_title1"
hide "bodies_title2"
hide "heads_title2"
hide "helmets_title2"
hide "message_structured"
hide "message_special"
hide "messagevip"
hide "xmasshat_info"
hide "xmasshaticon"
hide "message_rank_head"
hide "message_rank_helmet"
hide "warn_body"
hide "warn_head"
close "bodies";
close "heads";
//close model;
}
onOpen
{
hide "tabline1"
show "tabline2"
show "tabline3"
show "cover1"
hide "cover2"
hide "cover3"
open "bodies";
show "american"
show "russian"
show "british"
show "german"
show "structured"
hide "special"
hide "special2"
hide "original"
show "bodies_title1"
hide "heads_title1"
hide "helmets_title1"
hide "bodies_title2"
show "heads_title2"
show "helmets_title2"
show "warn_body"
hide "warn_head"
hide "message_structured"
hide "message_special"
hide "messagevip"
hide "xmasshat_info"
hide "xmasshaticon"
hide "message_rank_head"
hide "message_rank_helmet"
scriptmenuresponse "open";
}


The problem is: I see when I open the menu. It gives iprint with "open", but when I press Escape button, I dont see the iprint with "close". When I write at the standard ingame.menu on onEsc{} it does show the message. How is this possible?

IzNoGoD
27th November 2014, 19:07
Try putting it in onclose()

Ni3ls
28th November 2014, 14:26
Yes I already figured it out to use that. Thanks

IzNoGoD
28th November 2014, 15:05
So, it works now?

Ni3ls
28th November 2014, 19:44
Yeah it works with onClose