Jump to content

Problem


FuriouZ

Recommended Posts

Posted

Hello

I have problem with button and image...

I have created button on image, but if i press to the image,then i can't press to the button,i see it but nothing happens then,until i restart resource

Posted
  
guiSetEnabled (image,false) 
  

Small line makes big problem ..

Thanks ! :)

[EDIT]: But now there's another problem, buttons what are created on this image what i disabled are too disabled ,how to fix it ?

I tried

guiSetEnabled (GUIEditor.button[9],true) 

But it didn't worked

Posted
You disabled the image, are your buttons a child of your image? if so, your buttons will also be disabled. :P
  
      GUIEditor.staticimage[1] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/backround.png", true) 
      guiSetEnabled (GUIEditor.staticimage[1],false) 
      showCursor(true) 
-- 
-- 
-- 
        GUIEditor.button[9] = guiCreateButton(0.42, 0.94, 0.16, 0.06, "Enter", true, GUIEditor.staticimage[1]) 
        guiSetEnabled (GUIEditor.button[9],true) 
  
  

Posted

You should look up how the GUI Hierarchy works.

By default, when a parent is set as disabled - the children will be as well. In this case, your button is a child of your Image. Therefore when you disable the image, the button will be disabled too.

And if your button is not a child of your image, it will be brought to the back if you click on 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...