I want to override the default HUD title bar texture....without...getting into the whole theming thing
There's Frame constructor with the following signature:
1
| Frame(WidgetContainer, boolean, TitleDescription, String) |
You can create a TitleDescription from scratch as follows:
1 2 3 4
| Frame.TitleDescription titleDesc = new Frame.TitleDescription( ... ); titleDesc.setBackground( yourTexture ); titleDesc.set .... ... |
or, if you don't want to set all the properties, just retrieve the template from the current theme and change just the background texture:
1 2
| Frame.TitleDescription titleDesc = HUD.getTheme().getFrameTitleDescription(); titleDesc.setBackground( yourTexture ); |
Then just use the
full constructor of the Frame class as follows:
1 2 3
| Frame myFrame1 = new Frame( new Panel( ... ), true, titleDesc, "myFrameTitle1" ) ); Frame myFrame2 = new Frame( new Panel( ... ), true, titleDesc, "myFrameTitle2" ) ); Frame myFrame3 = new Frame( new Panel( ... ), true, titleDesc, "myFrameTitle3" ) ); |
Does this solve your problem?
Marvin