callum123 Posted September 23, 2012 Share Posted September 23, 2012 So I have an Image inside a GUI window, and I want to make it so that when I click on the image it does nothing, at the minute it will bring it to the front and cover over the buttons. Link to comment
50p Posted September 23, 2012 Share Posted September 23, 2012 https://wiki.multitheftauto.com/wiki/GuiMoveToBack ? Link to comment
callum123 Posted September 23, 2012 Author Share Posted September 23, 2012 Yeah, I used that, its just when I reclick on the image, it will bring it back to the front. Link to comment
50p Posted September 23, 2012 Share Posted September 23, 2012 Try this: img = guiCreateImage(....); --your image variable addEventHandler( "onClientGUIClick", img, function() guiMoveToBack( source ) end, false ); Link to comment
callum123 Posted September 23, 2012 Author Share Posted September 23, 2012 It works, but it flickers which is kind of annoying. Also if you do anything beside click to the image, such and hold and drag the cursor then the image will be on top again. Link to comment
HunT Posted September 23, 2012 Share Posted September 23, 2012 https://wiki.multitheftauto.com/wiki/GuiSetEnabled Easy Link to comment
xTeacherx Posted September 24, 2012 Share Posted September 24, 2012 Client img2 = guiCreateStaticImage(0.0217,0.0264,0.2928,0.2178,"gg.png",true,window) function eta() if (source == img2) then guiSetVisible ( graag, true ) -- end end addEventHandler("onClientGUIClick",img2,eta,false) Link to comment
TAPL Posted September 24, 2012 Share Posted September 24, 2012 Client img2 = guiCreateStaticImage(0.0217,0.0264,0.2928,0.2178,"gg.png",true,window) function eta() if (source == img2) then guiSetVisible ( graag, true ) -- end end addEventHandler("onClientGUIClick",img2,eta,false) lol. It works, but it flickers which is kind of annoying. Also if you do anything beside click to the image, such and hold and drag the cursor then the image will be on top again. This should work without flickers. guiSetProperty(img, "AlwaysOnTop", "true") Link to comment
xTeacherx Posted September 24, 2012 Share Posted September 24, 2012 img2 = guiCreateStaticImage(0.0217,0.0264,0.2928,0.2178,"gg.png",true) window = guiCreateStaticImage(290,86,461,606,"shruk.png",false) guiSetVisible(window,false) function eta() if (source == img2) then guiSetVisible ( window, true ) -- u r window end end addEventHandler("onClientGUIClick",img2,eta,false) Link to comment
50p Posted September 24, 2012 Share Posted September 24, 2012 It works, but it flickers which is kind of annoying. Also if you do anything beside click to the image, such and hold and drag the cursor then the image will be on top again. Have you tried this: https://wiki.multitheftauto.com/wiki/GuiSetEnabledEasy Link to comment
callum123 Posted September 25, 2012 Author Share Posted September 25, 2012 Alright, thanks for your help. I am not sure if any of them work, since I just scrapped the GUI window and used an image as my main screen thing, and then made the buttons children of the image. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now