Jump to content

Recommended Posts

Posted

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?

 

SpEcIeS

Posted

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.
 

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...