Jump to content

'guiBringToFront()' Problem with Labels


FSXTim

Recommended Posts

try this:

iphone_Window = guiCreateWindow(0.0401,0.2232,0.1255,0.3046,"",true) 
main = guiCreateStaticImage(0.3942,0.8146,0.2033,0.1307,"images/iphonebutton.png",true,iphone_Window) 
GUIEditor_Label1 = guiCreateLabel(0.0456,0.7568,0.9087,0.0547,"_______________________________",true,iphone_Window) 
guiLabelSetColor(GUIEditor_Label1,0,0,0) 
guiSetFont(GUIEditor_Label1,"default-bold-small") 
GUIEditor_Label2 = guiCreateLabel(0.0432,0.076,0.029,0.7204,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",true,iphone_Window) 
guiLabelSetColor(GUIEditor_Label2,0,0,0) 
guiSetFont(GUIEditor_Label2,"default-bold-small") 
GUIEditor_Label3 = guiCreateLabel(0.9295,0.076,0.029,0.7204,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",true,iphone_Window) 
guiLabelSetColor(GUIEditor_Label3,0,0,0) 
guiSetFont(GUIEditor_Label3,"default-bold-small") 
GUIEditor_Label4 = guiCreateLabel(0.0456,0.0486,0.9087,0.0547,"_______________________________",true,iphone_Window) 
guiLabelSetColor(GUIEditor_Label4,0,0,0) 
guiSetFont(GUIEditor_Label4,"default-bold-small") 
GUIEditor_Image2 = guiCreateStaticImage(0.1867,0.155,0.2241,0.1307,"images/mp3.png",true,iphone_Window) 
GUIEditor_Image3 = guiCreateStaticImage(0.5851,0.155,0.2199,0.1307,"images/notizen.png",true,iphone_Window) 
GUIEditor_Image4 = guiCreateStaticImage(0.5768,0.5775,0.2241,0.1459,"images/zeit.png",true,iphone_Window) 
GUIEditor_Image5 = guiCreateStaticImage(0.5809,0.3647,0.2158,0.1398,"images/sms.png",true,iphone_Window) 
GUIEditor_Image6 = guiCreateStaticImage(0.195,0.3678,0.1992,0.1277,"images/finfo.png",true,iphone_Window) 
GUIEditor_Image7 = guiCreateStaticImage(0.1909,0.5745,0.2033,0.1368,"images/hilfe.png",true,iphone_Window) 
GUIEditor_ImageSchwarz1 = guiCreateStaticImage(0.0372,0.0638,0.9256,0.9088,"images/schwarz.png",true,iphone_Window) 
  
function schwarz1(state) 
    if state == "left" then 
        if source == GUIEditor_ImageSchwarz1 then 
            guiBringToFront(main) 
            guiBringToFront(GUIEditor_Image2) 
            guiBringToFront(GUIEditor_Image3) 
            guiBringToFront(GUIEditor_Image4) 
            guiBringToFront(GUIEditor_Image5) 
            guiBringToFront(GUIEditor_Image6) 
            guiBringToFront(GUIEditor_Image7) 
            guiBringToFront(GUIEditor_Label1) 
            guiBringToFront(GUIEditor_Label2) 
            guiBringToFront(GUIEditor_Label3) 
            guiBringToFront(GUIEditor_Label4) -- bring the labels up after the images are brought to the front 
        end 
    end 
end 
addEventHandler("onClientGUIClick",guiRoot, schwarz1,true) --don't forget the boolean at the end. (true for source's and false for individual buttons) 

Link to comment

Thanks, sir!

That' working:

guiMoveToBack(GUIEditor_ImageSchwarz1) 
  
function schwarz1 (state) 
    if state == "left" then 
        if source == GUIEditor_ImageSchwarz1 then 
            guiMoveToBack(GUIEditor_ImageSchwarz1) 
        end 
    end 
end 
addEventHandler("onClientGUIClick", getRootElement(), schwarz1) 

Greets

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