use of betterquesting.api.client.themes.ITheme in project BetterQuesting by Funwayguy.
the class ThemeRegistry method getTexture.
public IGuiTexture getTexture(ResourceLocation key) {
if (key == null) {
return NULL_TEXTURE;
}
IGuiTexture tex = null;
// TODO: Remove this when fully converted...
ITheme legTheme = betterquesting.client.themes.ThemeRegistry.INSTANCE.getCurrentTheme();
if (legTheme != null && (activeTheme == null || !activeTheme.getID().equals(legTheme.getThemeID()))) {
activeTheme = new LegacyThemeWrapper(legTheme);
}
if (activeTheme != null) {
tex = activeTheme.getTexture(key);
}
tex = tex != null ? tex : defTextures.get(key);
return tex == null ? NULL_TEXTURE : tex;
}
Aggregations