Jump to content

Clicking on image help


callum123

Recommended Posts

Posted

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.

Posted

Try this:

img = guiCreateImage(....); --your image variable 
addEventHandler( "onClientGUIClick", img, function() guiMoveToBack( source ) end, false ); 

Posted

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.

Posted

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) 

Posted
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") 

Posted
  
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) 

Posted

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.

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