Jump to content

Smaller GUI not infront of other gui issue!


toptional

Recommended Posts

Hi, so im making this gui with buttons on it that open another GUI, for some reason when i press the button it opens the small gui, but it's behind the main one, how do i make it infront?

GUIEditor = { 
    button = {}, 
    window = {}, 
} 
  
        Window1 = guiCreateWindow(369, 184, 547, 378, "Airline Owner Panel", false) 
        guiSetAlpha(Window1, 0.84) 
  
        Button1= guiCreateButton(29, 40, 138, 67, "Airline Money", false, Window1) 
        guiSetFont(Button1, "default-bold-small") 
        guiSetProperty(Button1, "NormalTextColour", "FFFF0101") 
  
        Button2 = guiCreateButton(381, 46, 135, 67, "Invite Members", false, Window1) 
        guiSetFont(Button2, "default-bold-small") 
        guiSetProperty(Button2, "NormalTextColour", "FFFF0101") 
         
        Button3 = guiCreateButton(381, 123, 136, 68, "Member List", false, Window1) 
        guiSetFont(Button3, "default-bold-small") 
        guiSetProperty(Button3, "NormalTextColour", "FFFF0101") 
         
        Button4 = guiCreateButton(381, 201, 138, 66, "Set Payrate", false, Window1) 
        guiSetFont(Button4, "default-bold-small") 
        guiSetProperty(Button4, "NormalTextColour", "FFFF0101") 
         
        Button5 = guiCreateButton(380, 282, 141, 68, "Airline Vehicles List", false, Window1) 
        guiSetFont(Button5, "default-bold-small") 
        guiSetProperty(Button5, "NormalTextColour", "FFFF0101") 
         
        Button6 = guiCreateButton(29, 123, 136, 68, "Member List", false, Window1) 
        guiSetFont(Button6, "default-bold-small") 
        guiSetProperty(Button6, "NormalTextColour", "FFFF0101") 
         
        Button7 = guiCreateButton(29, 201, 138, 66, "Payrate\n70/30", false, Window1) 
        guiSetFont(Button7, "default-bold-small") 
        guiSetProperty(Button7, "NormalTextColour", "FFFF0101") 
         
        Button8 = guiCreateButton(29, 282, 141, 68, "Airline Vehicles \n7/10", false, Window1) 
        guiSetFont(Button8, "default-bold-small") 
        guiSetProperty(Button8, "NormalTextColour", "FFFF0101")    
  
        Window2 = guiCreateWindow(507, 308, 265, 121, "Set Payrate", false) 
        guiWindowSetSizable(Window2, false) 
         
        Edit1 = guiCreateEdit(29, 51, 158, 27, "Enter Payrate", false,Window2) 
         
        Button9 = guiCreateButton(201, 51, 37, 26, "Set", false, Window2) 
         
        guiSetVisible(Window2,false) 
         
guiSetVisible(Window1,false) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("$1,000,000", 412, 271, 537, 289, tocolor(255, 255, 255, 255), 0, "bankgothic", "left", "top", false, false, true, false, false) 
    end 
) 
  
function openWin() 
    if guiGetVisible(Window1) then 
        guiSetVisible(Window1, false) 
        showCursor(false) 
    else 
        guiSetVisible(Window1, true) 
        showCursor(true) 
    end 
end 
bindKey("F2", "down", openWin) 
  
  
function OpenWindow2 () 
        guiSetVisible ( Window2, true) 
        showCursor ( true ) 
    end 
addEventHandler ( "onClientGUIClick", Button4, OpenWindow2 ) 

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...