use of gregtech.api.terminal.gui.CustomTabListRenderer in project GregTech by GregTechCEu.
the class SettingsApp method initApp.
@Override
public AbstractApplication initApp() {
if (isClient) {
this.addWidget(new ImageWidget(5, 15, 323, 212, new ColorRectTexture(TerminalTheme.COLOR_B_2.getColor())));
this.tabGroup = new TabGroup<>(5, 15, new CustomTabListRenderer(TerminalTheme.COLOR_B_2, TerminalTheme.COLOR_F_2, 323 / 3, 10));
this.addWidget(this.tabGroup);
this.tabGroup.setOnTabChanged(this::onPagesChanged);
addTab("terminal.settings.theme", new ThemeSettings(getOs()));
addTab("terminal.settings.home", new HomeButtonSettings(getOs()));
addTab("terminal.settings.os", new OsSettings(getOs()));
}
return this;
}
use of gregtech.api.terminal.gui.CustomTabListRenderer in project GregTech by GregTechCEu.
the class RecipeChartApp method initApp.
@Override
public AbstractApplication initApp() {
if (isClient) {
this.tabGroup = new TabGroup<>(0, 10, new CustomTabListRenderer(TerminalTheme.COLOR_F_2, TerminalTheme.COLOR_B_3, 333 / getMaxPages(), 10));
this.tabGroup.setOnTabChanged(this::onPagesChanged);
this.addWidget(this.tabGroup);
loadLocalConfig(nbt -> {
if (nbt == null || nbt.isEmpty()) {
this.addTab("default");
} else {
for (NBTBase l : nbt.getTagList("list", Constants.NBT.TAG_COMPOUND)) {
NBTTagCompound container = (NBTTagCompound) l;
this.addTab(container.getString("name")).loadFromNBT((NBTTagCompound) container.getTag("data"));
}
tabGroup.setSelectedTab(nbt.getInteger("focus"));
}
});
}
return this;
}
Aggregations