Jump to content

[Help] GUI Window


iPanda

Recommended Posts

Help me create a function key that lets you open and close my GUI window with a picture and TabPanel, if you press the "I", or button closed

  
GUIEditor = { 
    window = {}, 
    staticimage = {} 
    tabpanel = {}, 
    button = {} 
} 
    my_window = guiCreateWindow(0, 0, 1, 1, true) 
    guiWindowSetSizable(my_window , false) 
    guiSetVisible ( my_window , false ) 
    guiSetAlpha(my_window , 10) 
    my_image = guiCreateStaticImage(0.14, 0.09, 0.71, 0.79, "images/pda.png", true, my_window ) 
    tabpanel = guiCreateTabPanel(107, 84, 770, 543, false, my_image ) 
    closed = guiCreateButton(0.89, 0.27, 0.03, 0.13, "", true, my_image ) 
    guiSetAlpha(closed, 0.15) 
    guiSetProperty(closed, "NormalTextColour", "FFAAAAAA") 
  
function open() 
    if ( guiGetVisible ( my_window )) == false then 
        guiSetVisible ( my_window, true ) 
        showCursor ( true ) 
    else 
        guiSetVisible ( my_window, false ) 
        showCursor ( false ) 
    end 
end 
bindKey ( "i", "down", open ) 

Link to comment
  
GUIEditor = { 
    window = {}, 
    staticimage = {} 
    tabpanel = {}, 
    button = {} 
} 
    my_window = guiCreateWindow(0, 0, 1, 1, true) 
    guiWindowSetSizable(my_window , false) 
    guiSetVisible ( my_window , false ) 
    guiSetAlpha(my_window , 10) 
    my_image = guiCreateStaticImage(0.14, 0.09, 0.71, 0.79, "images/pda.png", true, my_window ) 
    tabpanel = guiCreateTabPanel(107, 84, 770, 543, false, my_image ) 
    closed = guiCreateButton(0.89, 0.27, 0.03, 0.13, "", true, my_image ) 
    guiSetAlpha(closed, 0.15) 
    guiSetProperty(closed, "NormalTextColour", "FFAAAAAA") 
  
function open() 
    guiSetVisible ( my_window, not guiGetVisible ( my_window ) ); 
    showCursor ( guiGetVisible ( my_window ) ); 
end 
bindKey ( "i", "down", open ) 

Link to comment
  
GUIEditor = { 
    window = {}, 
    staticimage = {} 
    tabpanel = {}, 
    button = {} 
} 
    my_window = guiCreateWindow(0, 0, 1, 1, true) 
    guiWindowSetSizable(my_window , false) 
    guiSetVisible ( my_window , false ) 
    guiSetAlpha(my_window , 10) 
    my_image = guiCreateStaticImage(0.14, 0.09, 0.71, 0.79, "images/pda.png", true, my_window ) 
    tabpanel = guiCreateTabPanel(107, 84, 770, 543, false, my_image ) 
    closed = guiCreateButton(0.89, 0.27, 0.03, 0.13, "", true, my_image ) 
    guiSetAlpha(closed, 0.15) 
    guiSetProperty(closed, "NormalTextColour", "FFAAAAAA") 
  
function open() 
    guiSetVisible ( my_window, not guiGetVisible ( my_window ) ); 
    showCursor ( guiGetVisible ( my_window ) ); 
end 
bindKey ( "i", "down", open ) 

Does not work, you can check out for yourself

Link to comment
my_window = guiCreateWindow(0, 0, 1, 1, "", false) 
guiWindowSetSizable(my_window , false) 
guiSetVisible ( my_window , false ) 
guiSetAlpha(my_window , 10) 
my_image = guiCreateStaticImage(0.14, 0.09, 0.71, 0.79, "images/pda.png", true, my_window ) 
tabpanel = guiCreateTabPanel(107, 84, 770, 543, false, my_image ) 
closed = guiCreateButton(0.89, 0.27, 0.03, 0.13, "", true, my_image ) 
guiSetAlpha(closed, 0.15) 
guiSetProperty(closed, "NormalTextColour", "FFAAAAAA") 
  
bindKey ( "i", "down", 
    function ( ) 
        local state = ( not guiGetVisible ( my_window ) ) 
        guiSetVisible ( my_window, state ) 
        showCursor ( state ) 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...