Results 1 to 5 of 5

Thread: Fullscreen attribute for menus

  1. #1
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts

    Fullscreen attribute for menus

    Hi,

    I created a menu for the airstrike (some have seen it in video).
    In this menu, each dot is an element, and when players select it, the menu closes and the airstrike hits that position.

    Click image for larger version. 

Name:	airstrike.png 
Views:	43 
Size:	1,010.2 KB 
ID:	803

    The problem with it is that the first and last two columns don't work. Nothing happens when I click it.

    Then I tried to set the fullscreen attribute to the menu
    Code:
    fullScreen		1
    Problem solved, but now there's another one. When I select an element, the menu no longer closes.

    Here's part of my menudef (the rest of the menu is just the elements):
    PHP Code:
        name            "airstrike"
        
    rect            0 0 640 480
        fullScreen        1
        focuscolor        AIRSTRIKE_FOCUSED_COLOR
        style            WINDOW_STYLE_EMPTY
        blurWorld        5.0
        onEsc 
        
    {
            
    close airstrike;
        } 
    set logfile 2

  2. #2
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    I'm messing around with the rect, looks like it's something to do with that
    set logfile 2

  3. #3
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    I'm messing around with the rect, looks like it's something to do with that
    Always draw a boarder around your rectangle so you can see if it is positioned properly:

    Code:
    itemDef
    {
    	style			WINDOW_STYLE_SHADER
    	rect			-10 128 360 340
    	origin			ORIGIN_INFO_BOX1
    	background		"gradient"
    	border			1
    	bordersize		1
    	bordercolor		1.000 0.647 0.290 1
    	visible			1
    	decoration
    }

  4. The Following User Says Thank You to Tally For This Useful Post:

    guiismiti (29th November 2014)

  5. #4
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Looks like I solved it...

    PHP Code:
        name            "airstrike"
        
    rect            -83 0 1366 769
        focuscolor        AIRSTRIKE_FOCUSED_COLOR
        style            WINDOW_STYLE_EMPTY
            
        onEsc 
        
    {
            
    close airstrike;
        } 
    1. -83 is the original position of the first column of elements - the first two columns had negative values;
    2. I'm using 1366 instead of 640 - the position of the last two columns was higher than 640;
    3. I transposed all elements in the menu by adding +83 to their position value (so the first column is now positioned in 0, and not -83).

    Everything works, but...

    Click image for larger version. 

Name:	I-Have-No-Idea-What-Im-Doing-8.jpg 
Views:	34 
Size:	32.9 KB 
ID:	804

    editted: oh I think I get it now...
    Last edited by guiismiti; 29th November 2014 at 18:01.
    set logfile 2

  6. #5
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    Looks like I solved it...

    PHP Code:
        name            "airstrike"
        
    rect            -83 0 1366 769
        focuscolor        AIRSTRIKE_FOCUSED_COLOR
        style            WINDOW_STYLE_EMPTY
            
        onEsc 
        
    {
            
    close airstrike;
        } 
    1. -83 is the original position of the first column of elements - the first two columns had negative values;
    2. I'm using 1366 instead of 640 - the position of the last two columns was higher than 640;
    3. I transposed all elements in the menu by adding +83 to their position value (so the first column is now positioned in 0, and not -83).

    Everything works, but...

    Click image for larger version. 

Name:	I-Have-No-Idea-What-Im-Doing-8.jpg 
Views:	34 
Size:	32.9 KB 
ID:	804

    editted: oh I think I get it now...
    You cannot exceed the 640 width. It doesn't work. Since otherwise, the developers themselves would have used it. And they never did. You must stick with the 640 x 480 engine width.

Posting Permissions

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