The HUD is themable now!

I’ve added a theme functionality to the HUD. As the default theme I’ve taken Amos’ GTK-like textures.

See org.xith3d.ui.hud.utils.WidgetTheme and org.xith3d.ui.hud.resources.themes.GTK.zip, which is the default-theme.

To change the theme just call the static method:


HUD.setTheme(new WidgetTheme(new FileInputStream(new File("myZipArchive"))));

or:


HUD.setTheme(new WidgetTheme(new File("myZipArchive")));

or for built-in themes like GTK:


HUD.setTheme(new WidgetTheme("GTK"));
or
HUD.setTheme("GTK");

Marvin

Screenshot?

Kev

Here it is. But It’s not very meaningful, since in the HUD3DTest there’re shown several features of the HUD. So not every Widget uses the theme. But the GTK-like Widgets do: The GTK-Button, The Scrollbars and the ScrollPane.

Marvin

EDIT: Of course by default each Widget makes use of the currently set theme. But you can always override the defaults :slight_smile: