legacy-CyberTao
08-26-2003, 03:20 AM
anybody know how to use the gui styles?
I've made some attempts but nothing works so far:
I've made a subclass of guiStyle (lets call it myGuistyle)
I've set the keyname (I think this is how the style is used by a gui component) and set all the image[] to a custom texture like this:
class myGuiStyle extends guyStyles;
#exec texture import etc...(to import the texture 'toto')
DefaultProperties
{
keyname="tata"
Images(0)=Texture'toto'
Images(1)=Texture'toto'
Images(2)=Texture'toto'
Images(3)=Texture'toto'
Images(4)=Texture'toto'
}
then I created a guibutton in a guiPage like that:
class myGuiPage extends GUIPage;
//(...)snip
DefaultProperties
{
Begin Object Class=GUIButton name=myButton
bNeverFocus=true
bAcceptsInput=false
StyleName="tata"
WinWidth = 1;
Winleft = 0;
WinHeight = 0.8;
WinTop = 0.1;
End Object
Controls(0)=GUIButton'myButton'
}
I think this is all that would be required to change the background textuer of the texture but unfortunately it doesn't work : the button has not texture at all( not even the default blue one).
Anyone having some luck with Guistyles so far?
I've made some attempts but nothing works so far:
I've made a subclass of guiStyle (lets call it myGuistyle)
I've set the keyname (I think this is how the style is used by a gui component) and set all the image[] to a custom texture like this:
class myGuiStyle extends guyStyles;
#exec texture import etc...(to import the texture 'toto')
DefaultProperties
{
keyname="tata"
Images(0)=Texture'toto'
Images(1)=Texture'toto'
Images(2)=Texture'toto'
Images(3)=Texture'toto'
Images(4)=Texture'toto'
}
then I created a guibutton in a guiPage like that:
class myGuiPage extends GUIPage;
//(...)snip
DefaultProperties
{
Begin Object Class=GUIButton name=myButton
bNeverFocus=true
bAcceptsInput=false
StyleName="tata"
WinWidth = 1;
Winleft = 0;
WinHeight = 0.8;
WinTop = 0.1;
End Object
Controls(0)=GUIButton'myButton'
}
I think this is all that would be required to change the background textuer of the texture but unfortunately it doesn't work : the button has not texture at all( not even the default blue one).
Anyone having some luck with Guistyles so far?