Jump to content

Can I apply different skin with the same widget?


photo

Recommended Posts

Hello Qiang,

 

You have several options:

 

1) Setup a new skin for the whole gui. That's probably not what you're looking for but it still might be useful for you (https://developer.unigine.com/en/docs/1.0/code/gui/skin/).

 

2) Use WidgetCanvas (https://developer.unigine.com/en/docs/1.0/scripting/library/gui/class.widgetcanvas) to draw custom button manually. Please look at samples/widgets/canvas_00 example.

 

3) Use WidgetSprite, set its texture to custom and setup enter/leave/clicked callbacks so it'll mimic button behaviour. You can find more in samples/widgets/ui_02.

Link to comment
×
×
  • Create New...