Results 1 to 5 of 5

Thread: onEsc{}

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    onEsc{}

    Hi all,

    I got a custom menu
    Code:
    {
    	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?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Try putting it in onclose()
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Yes I already figured it out to use that. Thanks

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    So, it works now?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #5
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Yeah it works with onClose

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •