Jump to content

Check loaded GUI image


Recommended Posts

Hello everybody, I'm wondering if there's any way to check which image is loaded when I use guiStaticImageLoadImage function, and if image1 is loaded then label color is black, else if image2 is loaded then label color is white. Is there any way to do this?

Here's my try, which is not working:

  
img = guiCreateStaticImage(0.0, 0.3, 1, 0.375, "img/image1.png", true, window) 
            label = guiCreateLabel(0.3, 0.1, 0.5, 0.2, "test", true, img) 
            if (img == "img/image1.png") then 
                guiLabelSetColor(label, 255, 255, 255) 
            else 
                guiLabelSetColor(label, 0, 0, 0) 
            end 
  

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