Jump to content

guiBringToFront Problem


FSXTim

Recommended Posts

I have two windows and I want to bring one of them to the front. But it's still in the background!

function OpenRules_Button (state) 
    if state == "left" then 
        if source == GUIEditor_Button1 or source == GUIEditor_Button3 then 
            guiSetVisible(Regeln_Window, true)   
            guiBringToFront (Regeln_Window)              
        end  
    end 
end 
addEventHandler("onClientGUIClick", getRootElement(), OpenRules_Button) 

Can anybody help me?

Greets

Link to comment

try this:

function OpenRules_Button (button,state) -- there's one more argument before state is defineed 
    if state == "left" then 
        if source == GUIEditor_Button1 or source == GUIEditor_Button3 then 
            guiSetVisible(Regeln_Window, true)  
            guiBringToFront (Regeln_Window)             
        end  
    end 
end 
addEventHandler("onClientGUIClick",guiRoot, OpenRules_Button) --defined root as guiRoot 

I've add a couple of comments for you

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