[SOLVED] colour of buttons

Fred

17-01-2009 19:09:44

Hi there!
I created some Buttons in a layout-file and I edit the colour of some by using: <Property key="Widget_Colour" value="0.49 0 0"/>
But now I've the problem, that the button gets his original colour(is defined in the skin-file), if I hover the button and leave the button again.
Is it possible to change the colour of a button all the time(maybe to change even the hover-colour)?

Thanks for your help
Fred

Five_stars

17-01-2009 20:18:13

This property has to change only colour of caption on the widget. Are you sure that you had a moment, when your button was coloured in your colour?

I thing the only way to colour button... change skin texture.. yes.

Altren

17-01-2009 20:27:16

There's two ways to do it:
1. You can use coloured text as caption: "#00FF00Caption" - green caption
2. Change button skin.
<Skin name = "Button" size = "29 26" texture = "#{MyGUI_Theme_Texture}">
...
<BasisSkin type="SimpleText" offset = "1 1 25 22" align = "Stretch">
<State name="normal" colour="#00FF00" shift = "false"/>
...
</BasisSkin>
</Skin>
<State name="normal" colour="#00FF00" shift = "false"/>
Set colours that you need for all states.

Fred

18-01-2009 17:17:12

Okay thank you! Now it works