FuriouZ Posted November 16, 2013 Posted November 16, 2013 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 Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Dealman Posted November 16, 2013 Posted November 16, 2013 The image needs to be the parent of the button. Other than that, you could use guiBringToFront. If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
tosfera Posted November 16, 2013 Posted November 16, 2013 Please note that, the guiBringToFront will cause a small problem with your cursor. For more details click here If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
FuriouZ Posted November 16, 2013 Author Posted November 16, 2013 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 Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
tosfera Posted November 16, 2013 Posted November 16, 2013 You disabled the image, are your buttons a child of your image? if so, your buttons will also be disabled. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
FuriouZ Posted November 16, 2013 Author Posted November 16, 2013 You disabled the image, are your buttons a child of your image? if so, your buttons will also be disabled. 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) Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Dealman Posted November 16, 2013 Posted November 16, 2013 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. If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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