~!#abdullah Posted December 24, 2012 Share Posted December 24, 2012 hi I want code coloring all the buttons a uniform color Link to comment
iPrestege Posted December 24, 2012 Share Posted December 24, 2012 You Have To Use: GuiSetProperty I think you cant coloring all gui buttons with one code . Link to comment
3NAD Posted December 24, 2012 Share Posted December 24, 2012 I think you cant coloring all gui buttons with one code . Use Table : ) Link to comment
iPrestege Posted December 24, 2012 Share Posted December 24, 2012 I think you cant coloring all gui buttons with one code . Use Table : ) Hmmm.... a good idea to use it in the future! thanks i will try it later . ( = Link to comment
Ab-47 Posted December 24, 2012 Share Posted December 24, 2012 GuiSetProperty ^^ Is correct, however I guess you'd be needing the correct property to insert, you can find a list of the properties here: http://cegui.org.uk/static/WindowsLookProperties.html Link to comment
iPrestege Posted December 25, 2012 Share Posted December 25, 2012 -- Try This / Should Be Button Name With GUIEditor_Button for i,color in ipairs(GUIEditor_Button) do guiSetProperty(color,"NormalTextColour","FFFF0000") end Link to comment
~!#abdullah Posted December 27, 2012 Author Share Posted December 27, 2012 -- Try This / Should Be Button Name With GUIEditor_Button for i,color in ipairs(GUIEditor_Button) do guiSetProperty(color,"NormalTextColour","FFFF0000") end not working Link to comment
Kenix Posted December 27, 2012 Share Posted December 27, 2012 (edited) for _, pButton in ipairs( getElementsByType( 'gui-button' ) ) do guiSetProperty( pButton, 'NormalTextColour', 'FF0055FF' ) end Edited December 27, 2012 by Guest Link to comment
iPrestege Posted December 27, 2012 Share Posted December 27, 2012 (edited) for i,color in ipairs(GUIEditor_Button) do guiSetProperty(color,"NormalTextColour","ff00ff00") end Must be the names of all the buttons with the same name Example : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(558,158,247,294,"●●●|| Spawn Panel ||●●●",false) GUIEditor_Button[1] = guiCreateButton(14,95,89,39,"Police",false,GUIEditor_Window[1]) for i,color in ipairs(GUIEditor_Button) do guiSetProperty(color,"NormalTextColour","ff00ff00") end Note: If the names of buttons different You must make the same name with the all buttons but change the number of the button and change it from the iparis . , Edited December 27, 2012 by Guest Link to comment
Ab-47 Posted December 27, 2012 Share Posted December 27, 2012 not working Button = guiCreateButton( 20, 200, 150, 30, "", false ) guiSetProperty ( Button, "NormalTextColour", "FFFF0000" ) Well I guess your problem is the color, try using another HEX code. Example: #00FF00 or #FFFF00 Example: guiSetProperty ( Button, "NormalTextColour", "00FF00" ) Link to comment
~!#abdullah Posted December 29, 2012 Author Share Posted December 29, 2012 for _, pButton in ipairs( getElementsByType( 'gui-button' ) ) do guiSetProperty( pButton, 'NormalTextColour', 'FF0055FF' ) end thank you 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