use of gregtech.common.terminal.app.recipechart.widget.RGContainer in project GregTech by GregTechCEu.
the class RecipeChartApp method addTab.
private RGContainer addTab(String name) {
name = name.isEmpty() ? "default" : name;
RGContainer container = new RGContainer(0, 0, 333, 222, getOs());
container.setBackground(TerminalTheme.COLOR_B_3);
tabGroup.addTab(new IGuiTextureTabInfo(new TextTexture(name, -1).setWidth(333 / getMaxPages() - 5).setType(tabGroup.getAllTag().isEmpty() ? TextTexture.TextType.ROLL : TextTexture.TextType.HIDE), name), container);
return container;
}
use of gregtech.common.terminal.app.recipechart.widget.RGContainer in project GregTech by GregTechCEu.
the class RecipeChartApp method onOSSizeUpdate.
@Override
public void onOSSizeUpdate(int width, int height) {
this.setSize(new Size(width, height));
if (tabGroup != null) {
Size size = new Size(width, height - 10);
for (Widget widget : tabGroup.widgets) {
if (widget instanceof RGContainer) {
widget.setSize(size);
}
}
tabGroup.setSize(size);
}
}
Aggregations