Jump to content
SpEcIeS

Widgets and Color

Recommended Posts

The last few days have been a GUI experiment time. Now applying color to panels seem to be easily done with: GameMenu.mainpanel:SetObject("backgroundcolor",Vec4(0.5,0.5,0.5,0.5)), however this does not seem to work with the button widget.

What would be the method of changing color with widgets such as buttons?

 

Share this post


Link to post

you would need to create a custom button script for that.
just take the Button.lua from Scripts/GUI/ and create a copy and edit it.

set the new script with either Widget::SetScript() or Widget:Create().
for info on how to change color you could use Panel.lua as a example.
 

Share this post


Link to post

Since this was something that was not even considered, this information that you have provided will be most helpful. Many thanks. :D

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...