klaw Posted May 12, 2017 Share Posted May 12, 2017 I've tried to experiment with the property 'LookNFeel' for CEGUI, but I have no idea what it does. Does anybody know? Link to comment
Dr.Marco Posted May 12, 2017 Share Posted May 12, 2017 This example creates a button when the resource starts and defines a console command that toggles it between enabled (clickable) and disabled (not clickable). function onStart() button = guiCreateButton( 20, 200, 150, 30, "Test", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement(), onStart ) function toogleButton() local currentState = guiGetProperty( button, "Disabled" ) if currentState == "False" then guiSetProperty( button, "Disabled", "True" ) else guiSetProperty( button, "Disabled", "False" ) end end addCommandHandler( "togglebtn", toogleButton ) Link to comment
klaw Posted May 12, 2017 Author Share Posted May 12, 2017 6 minutes ago, Dr.Marco said: This example creates a button when the resource starts and defines a console command that toggles it between enabled (clickable) and disabled (not clickable). function onStart() button = guiCreateButton( 20, 200, 150, 30, "Test", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement(), onStart ) function toogleButton() local currentState = guiGetProperty( button, "Disabled" ) if currentState == "False" then guiSetProperty( button, "Disabled", "True" ) else guiSetProperty( button, "Disabled", "False" ) end end addCommandHandler( "togglebtn", toogleButton ) That didn't answer my question. I know how to use guiSetProperty. I'm asking about the property "LookNFeel". Not "Disabled". 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