diff --git a/.gitignore b/.gitignore
index c2fb66e1e33..3b2f04a46c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,6 +74,7 @@ local.properties
/classes/
/out/
/build/
+.run/
# Linux
*~
diff --git a/dependencies.gradle b/dependencies.gradle
index 6a45ca2165f..2f7bced09b6 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -40,9 +40,10 @@
dependencies {
// Published dependencies
api("codechicken:codechickenlib:3.2.3.358")
- api("com.cleanroommc:modularui:2.5.0-rc4") { transitive = false }
+ api("com.cleanroommc:modularui:3.0.3") { transitive = false }
api("com.cleanroommc:groovyscript:1.2.0-hotfix1") { transitive = false }
- api("curse.maven:inventory-bogosorter-632327:4951607-deobf-4951608-sources-4951609")
+ api("curse.maven:inventory-bogosorter-632327:7102721-deobf-6717233-sources-6717234")
+ api("curse.maven:key-binding-patch-928895:5951859")
api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.700")
api("appeng:ae2-uel:v0.56.4") { transitive = false }
api rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
diff --git a/src/main/java/gregtech/api/cover/CoverWithUI.java b/src/main/java/gregtech/api/cover/CoverWithUI.java
index 6c288e08137..8802f23fc2f 100644
--- a/src/main/java/gregtech/api/cover/CoverWithUI.java
+++ b/src/main/java/gregtech/api/cover/CoverWithUI.java
@@ -21,6 +21,7 @@
import com.cleanroommc.modularui.factory.SidedPosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.utils.Alignment;
import com.cleanroommc.modularui.utils.Color;
import com.cleanroommc.modularui.utils.MouseData;
@@ -65,7 +66,7 @@ default GTGuiTheme getUITheme() {
}
@Override
- default ModularPanel buildUI(SidedPosGuiData guiData, PanelSyncManager guiSyncManager) {
+ default ModularPanel buildUI(SidedPosGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
return null;
}
diff --git a/src/main/java/gregtech/api/items/gui/ItemUIFactory.java b/src/main/java/gregtech/api/items/gui/ItemUIFactory.java
index 6633e96bb8b..f1444152f5f 100644
--- a/src/main/java/gregtech/api/items/gui/ItemUIFactory.java
+++ b/src/main/java/gregtech/api/items/gui/ItemUIFactory.java
@@ -13,6 +13,7 @@
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import org.jetbrains.annotations.ApiStatus;
@@ -39,7 +40,7 @@ default GTGuiTheme getUITheme() {
}
@Override
- default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager) {
+ default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
return null;
}
}
diff --git a/src/main/java/gregtech/api/items/toolitem/IGTTool.java b/src/main/java/gregtech/api/items/toolitem/IGTTool.java
index 679b22118b3..d37e8ec3643 100644
--- a/src/main/java/gregtech/api/items/toolitem/IGTTool.java
+++ b/src/main/java/gregtech/api/items/toolitem/IGTTool.java
@@ -72,11 +72,11 @@
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.factory.ItemGuiFactory;
import com.cleanroommc.modularui.screen.ModularPanel;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.utils.Alignment;
import com.cleanroommc.modularui.value.sync.IntSyncValue;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.cleanroommc.modularui.widgets.ButtonWidget;
-import com.cleanroommc.modularui.widgets.TextWidget;
import com.cleanroommc.modularui.widgets.layout.Flow;
import com.enderio.core.common.interfaces.IOverlayRenderAware;
import com.google.common.collect.HashMultimap;
@@ -947,7 +947,7 @@ default void playSound(EntityPlayer player) {
}
@Override
- default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager manager) {
+ default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager manager, UISettings settings) {
final var usedStack = guiData.getUsedItemStack();
final var behaviorsTag = getBehaviorsTag(usedStack);
final var defaultDefinition = getMaxAoEDefinition(usedStack);
@@ -1006,14 +1006,15 @@ default Flow createColumn(IntSyncValue syncValue, String lang, boolean shouldDou
return Flow.column()
.coverChildren()
- .child(new TextWidget(IKey.lang("item.gt.tool.aoe." + lang))
+ .child(IKey.lang("item.gt.tool.aoe." + lang)
+ .asWidget()
.marginBottom(5))
.child(Flow.row()
.coverChildren()
.marginBottom(5)
.child(increaseButton)
.child(decreaseButton))
- .child(new TextWidget(display)
+ .child(display.asWidget()
.alignment(Alignment.Center)
.widthRel(1f));
}
diff --git a/src/main/java/gregtech/api/items/toolitem/ItemGTToolbelt.java b/src/main/java/gregtech/api/items/toolitem/ItemGTToolbelt.java
index 6d28d550b2f..6f0fd069c92 100644
--- a/src/main/java/gregtech/api/items/toolitem/ItemGTToolbelt.java
+++ b/src/main/java/gregtech/api/items/toolitem/ItemGTToolbelt.java
@@ -51,10 +51,11 @@
import com.cleanroommc.modularui.api.drawable.IKey;
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.cleanroommc.modularui.value.sync.SyncHandlers;
-import com.cleanroommc.modularui.widgets.ItemSlot;
import com.cleanroommc.modularui.widgets.layout.Grid;
+import com.cleanroommc.modularui.widgets.slot.ItemSlot;
import com.cleanroommc.modularui.widgets.slot.SlotGroup;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
@@ -106,12 +107,12 @@ public ItemStack getToolInSlot(@NotNull ItemStack toolbelt, int slot) {
}
@Override
- public ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager) {
+ public ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
final var usedStack = guiData.getUsedItemStack();
final var handler = getHandler(usedStack);
final var selected = handler.getSelectedStack();
if (!selected.isEmpty() && selected.getItem() instanceof ItemUIFactory factory) {
- return factory.buildUI(guiData, guiSyncManager);
+ return factory.buildUI(guiData, guiSyncManager, settings);
}
int heightBonus = (handler.getSlots() / 9) * 18;
diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
index e4d93026f8f..e3ca9cab534 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
@@ -94,6 +94,7 @@
import com.cleanroommc.modularui.factory.PosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.google.common.base.Preconditions;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
@@ -493,7 +494,7 @@ public GTGuiTheme getUITheme() {
}
@Override
- public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager) {
+ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager, UISettings settings) {
return null;
}
diff --git a/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java b/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java
index 1f31dce42a0..165e2ca69df 100644
--- a/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java
+++ b/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java
@@ -25,6 +25,7 @@
import com.cleanroommc.modularui.factory.PosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
+import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import org.jetbrains.annotations.NotNull;
@@ -394,7 +395,7 @@ protected MultiblockUIFactory createUIFactory() {
}
@Override
- public final ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager) {
+ public final ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager, UISettings settings) {
if (uiFactory == null) uiFactory = createUIFactory();
return this.uiFactory.buildUI(guiData, panelSyncManager);
}
diff --git a/src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIFactory.java b/src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIFactory.java
index 495a80a8aa8..e158a76d0d0 100644
--- a/src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIFactory.java
+++ b/src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIFactory.java
@@ -247,7 +247,7 @@ public MultiblockUIFactory addScreenChildren(ScreenFunction function) {
this.screenFunction.addWidgets(panel, panelSyncManager);
}
- var playerInv = SlotGroupWidget.playerInventory(0);
+ var playerInv = SlotGroupWidget.playerInventory(false);
if (disableButtons) {
playerInv.alignX(0.5f);
} else {
diff --git a/src/main/java/gregtech/api/mui/GTGuiTextures.java b/src/main/java/gregtech/api/mui/GTGuiTextures.java
index d1a46722ba4..ce808aa0c18 100644
--- a/src/main/java/gregtech/api/mui/GTGuiTextures.java
+++ b/src/main/java/gregtech/api/mui/GTGuiTextures.java
@@ -4,11 +4,13 @@
import com.cleanroommc.modularui.api.drawable.IDrawable;
import com.cleanroommc.modularui.api.drawable.IKey;
+import com.cleanroommc.modularui.drawable.ColorType;
import com.cleanroommc.modularui.drawable.UITexture;
import com.cleanroommc.modularui.screen.viewport.GuiContext;
import com.cleanroommc.modularui.theme.WidgetTheme;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* GT MUI textures.
@@ -58,11 +60,9 @@ private static String id(String path) {
public static final UITexture GREGTECH_LOGO_XMAS = fullImage("textures/gui/icon/gregtech_logo_xmas.png");
public static final UITexture GREGTECH_LOGO_DARK = fullImage("textures/gui/icon/gregtech_logo_dark.png");
public static final IDrawable GREGTECH_LOGO_BLINKING_YELLOW = animated(
- "textures/gui/icon/gregtech_logo_blinking_yellow.png",
- 17, 34, false, 60);
+ "textures/gui/icon/gregtech_logo_blinking_yellow.png", 17, 34, 60);
public static final IDrawable GREGTECH_LOGO_BLINKING_RED = animated(
- "textures/gui/icon/gregtech_logo_blinking_red.png",
- 17, 34, false, 36);
+ "textures/gui/icon/gregtech_logo_blinking_red.png", 17, 34, 36);
public static final UITexture INDICATOR_NO_ENERGY = fullImage("textures/gui/base/indicator_no_energy.png");
public static final UITexture INDICATOR_NO_STEAM_BRONZE = fullImage(
@@ -209,18 +209,18 @@ private static String id(String path) {
"textures/gui/widget/hpca/damaged_computation_component.png");
public static final UITexture[] BUTTON_BLACKLIST = slice("textures/gui/widget/button_blacklist.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture[] BUTTON_IGNORE_DAMAGE = slice("textures/gui/widget/button_filter_damage.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture[] BUTTON_IGNORE_NBT = slice("textures/gui/widget/button_filter_nbt.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture[] BUTTON_CASE_SENSITIVE = slice(
"textures/gui/widget/ore_filter/button_case_sensitive.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture[] BUTTON_MATCH_ALL = slice("textures/gui/widget/ore_filter/button_match_all.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture BUTTON_LOCK = fullImage("textures/gui/widget/button_lock.png");
public static final UITexture OREDICT_ERROR = fullImage("textures/gui/widget/ore_filter/error.png");
@@ -235,34 +235,34 @@ private static String id(String path) {
public static final IDrawable MINUS = IKey.str("-").asIcon().marginLeft(1);
public static final UITexture[] MANUAL_IO_OVERLAY_IN = slice("textures/gui/overlay/manual_io_overlay_in.png",
- 18, 18 * 3, 18, 18, true);
+ 18, 18 * 3, 18, 18, ColorType.DEFAULT);
public static final UITexture[] MANUAL_IO_OVERLAY_OUT = slice("textures/gui/overlay/manual_io_overlay_out.png",
- 18, 18 * 3, 18, 18, true);
+ 18, 18 * 3, 18, 18, ColorType.DEFAULT);
public static final UITexture[] CONVEYOR_MODE_OVERLAY = slice("textures/gui/overlay/conveyor_mode_overlay.png",
- 18, 18 * 2, 18, 18, true);
+ 18, 18 * 2, 18, 18, ColorType.DEFAULT);
public static final UITexture[] TRANSFER_MODE_OVERLAY = slice("textures/gui/overlay/transfer_mode_overlay.png",
- 18, 18 * 3, 18, 18, true);
+ 18, 18 * 3, 18, 18, ColorType.DEFAULT);
public static final UITexture[] FLUID_TRANSFER_MODE_OVERLAY = slice(
"textures/gui/overlay/fluid_transfer_mode_overlay.png",
- 18, 18 * 3, 18, 18, true);
+ 18, 18 * 3, 18, 18, ColorType.DEFAULT);
public static final UITexture[] DISTRIBUTION_MODE_OVERLAY = slice(
"textures/gui/widget/button_distribution_mode.png",
- 16, 48, 16, 16, true);
+ 16, 48, 16, 16, ColorType.DEFAULT);
public static final UITexture[] VOIDING_MODE_OVERLAY = slice(
"textures/gui/overlay/voiding_mode_overlay.png",
- 16, 32, 16, 16, true);
+ 16, 32, 16, 16, ColorType.DEFAULT);
public static final UITexture[] FILTER_MODE_OVERLAY = slice(
"textures/gui/overlay/filter_mode_overlay.png",
- 16, 48, 16, 16, true);
+ 16, 48, 16, 16, ColorType.DEFAULT);
public static final UITexture[] PRIVATE_MODE_BUTTON = slice(
"textures/gui/widget/button_public_private.png",
- 18, 36, 18, 18, true);
+ 18, 36, 18, 18, ColorType.DEFAULT);
public static final UITexture MENU_OVERLAY = fullImage("textures/gui/overlay/menu_overlay.png");
@@ -286,111 +286,170 @@ private static String id(String path) {
// todo bronze/steel/primitive fluid slots?
// SLOT OVERLAYS
- public static final UITexture ATOMIC_OVERLAY_1 = fullImage("textures/gui/overlay/atomic_overlay_1.png", true);
- public static final UITexture ATOMIC_OVERLAY_2 = fullImage("textures/gui/overlay/atomic_overlay_2.png", true);
- public static final UITexture ARROW_INPUT_OVERLAY = fullImage("textures/gui/overlay/arrow_input_overlay.png", true);
+ public static final UITexture ATOMIC_OVERLAY_1 = fullImage("textures/gui/overlay/atomic_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture ATOMIC_OVERLAY_2 = fullImage("textures/gui/overlay/atomic_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture ARROW_INPUT_OVERLAY = fullImage("textures/gui/overlay/arrow_input_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture ARROW_OUTPUT_OVERLAY = fullImage("textures/gui/overlay/arrow_output_overlay.png",
- true);
- public static final UITexture BATTERY_OVERLAY = fullImage("textures/gui/overlay/battery_overlay.png", true);
- public static final UITexture BEAKER_OVERLAY_1 = fullImage("textures/gui/overlay/beaker_overlay_1.png", true);
- public static final UITexture BEAKER_OVERLAY_2 = fullImage("textures/gui/overlay/beaker_overlay_2.png", true);
- public static final UITexture BEAKER_OVERLAY_3 = fullImage("textures/gui/overlay/beaker_overlay_3.png", true);
- public static final UITexture BEAKER_OVERLAY_4 = fullImage("textures/gui/overlay/beaker_overlay_4.png", true);
- public static final UITexture BENDER_OVERLAY = fullImage("textures/gui/overlay/bender_overlay.png", true);
- public static final UITexture BOX_OVERLAY = fullImage("textures/gui/overlay/box_overlay.png", true);
- public static final UITexture BOXED_OVERLAY = fullImage("textures/gui/overlay/boxed_overlay.png", true);
- public static final UITexture BREWER_OVERLAY = fullImage("textures/gui/overlay/brewer_overlay.png", true);
- public static final UITexture CANNER_OVERLAY = fullImage("textures/gui/overlay/canner_overlay.png", true);
- public static final UITexture CHARGER_OVERLAY = fullImage("textures/gui/overlay/charger_slot_overlay.png", true);
- public static final UITexture CANISTER_OVERLAY = fullImage("textures/gui/overlay/canister_overlay.png", true);
+ ColorType.DEFAULT);
+ public static final UITexture BATTERY_OVERLAY = fullImage("textures/gui/overlay/battery_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture BEAKER_OVERLAY_1 = fullImage("textures/gui/overlay/beaker_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture BEAKER_OVERLAY_2 = fullImage("textures/gui/overlay/beaker_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture BEAKER_OVERLAY_3 = fullImage("textures/gui/overlay/beaker_overlay_3.png",
+ ColorType.DEFAULT);
+ public static final UITexture BEAKER_OVERLAY_4 = fullImage("textures/gui/overlay/beaker_overlay_4.png",
+ ColorType.DEFAULT);
+ public static final UITexture BENDER_OVERLAY = fullImage("textures/gui/overlay/bender_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture BOX_OVERLAY = fullImage("textures/gui/overlay/box_overlay.png", ColorType.DEFAULT);
+ public static final UITexture BOXED_OVERLAY = fullImage("textures/gui/overlay/boxed_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture BREWER_OVERLAY = fullImage("textures/gui/overlay/brewer_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture CANNER_OVERLAY = fullImage("textures/gui/overlay/canner_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture CHARGER_OVERLAY = fullImage("textures/gui/overlay/charger_slot_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture CANISTER_OVERLAY = fullImage("textures/gui/overlay/canister_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture CANISTER_OVERLAY_BRONZE = fullImage(
"textures/gui/overlay/canister_overlay_bronze.png");
public static final UITexture CANISTER_OVERLAY_STEEL = fullImage("textures/gui/overlay/canister_overlay_steel.png");
- public static final UITexture CENTRIFUGE_OVERLAY = fullImage("textures/gui/overlay/centrifuge_overlay.png", true);
- public static final UITexture CIRCUIT_OVERLAY = fullImage("textures/gui/overlay/circuit_overlay.png", true);
+ public static final UITexture CENTRIFUGE_OVERLAY = fullImage("textures/gui/overlay/centrifuge_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture CIRCUIT_OVERLAY = fullImage("textures/gui/overlay/circuit_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture COAL_OVERLAY_BRONZE = fullImage("textures/gui/overlay/coal_overlay_bronze.png");
public static final UITexture COAL_OVERLAY_STEEL = fullImage("textures/gui/overlay/coal_overlay_steel.png");
- public static final UITexture COMPRESSOR_OVERLAY = fullImage("textures/gui/overlay/compressor_overlay.png", true);
+ public static final UITexture COMPRESSOR_OVERLAY = fullImage("textures/gui/overlay/compressor_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture COMPRESSOR_OVERLAY_BRONZE = fullImage(
"textures/gui/overlay/compressor_overlay_bronze.png");
public static final UITexture COMPRESSOR_OVERLAY_STEEL = fullImage(
"textures/gui/overlay/compressor_overlay_steel.png");
- public static final UITexture CRACKING_OVERLAY_1 = fullImage("textures/gui/overlay/cracking_overlay_1.png", true);
- public static final UITexture CRACKING_OVERLAY_2 = fullImage("textures/gui/overlay/cracking_overlay_2.png", true);
- public static final UITexture CRUSHED_ORE_OVERLAY = fullImage("textures/gui/overlay/crushed_ore_overlay.png", true);
+ public static final UITexture CRACKING_OVERLAY_1 = fullImage("textures/gui/overlay/cracking_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture CRACKING_OVERLAY_2 = fullImage("textures/gui/overlay/cracking_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture CRUSHED_ORE_OVERLAY = fullImage("textures/gui/overlay/crushed_ore_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture CRUSHED_ORE_OVERLAY_BRONZE = fullImage(
"textures/gui/overlay/crushed_ore_overlay_bronze.png");
public static final UITexture CRUSHED_ORE_OVERLAY_STEEL = fullImage(
"textures/gui/overlay/crushed_ore_overlay_steel.png");
- public static final UITexture CRYSTAL_OVERLAY = fullImage("textures/gui/overlay/crystal_overlay.png", true);
- public static final UITexture CUTTER_OVERLAY = fullImage("textures/gui/overlay/cutter_overlay.png", true);
+ public static final UITexture CRYSTAL_OVERLAY = fullImage("textures/gui/overlay/crystal_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture CUTTER_OVERLAY = fullImage("textures/gui/overlay/cutter_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture DARK_CANISTER_OVERLAY = fullImage("textures/gui/overlay/dark_canister_overlay.png",
- true);
- public static final UITexture DUST_OVERLAY = fullImage("textures/gui/overlay/dust_overlay.png", true);
+ ColorType.DEFAULT);
+ public static final UITexture DUST_OVERLAY = fullImage("textures/gui/overlay/dust_overlay.png", ColorType.DEFAULT);
public static final UITexture DUST_OVERLAY_BRONZE = fullImage("textures/gui/overlay/dust_overlay_bronze.png");
public static final UITexture DUST_OVERLAY_STEEL = fullImage("textures/gui/overlay/dust_overlay_steel.png");
- public static final UITexture EXTRACTOR_OVERLAY = fullImage("textures/gui/overlay/extractor_overlay.png", true);
+ public static final UITexture EXTRACTOR_OVERLAY = fullImage("textures/gui/overlay/extractor_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture EXTRACTOR_OVERLAY_BRONZE = fullImage(
"textures/gui/overlay/extractor_overlay_bronze.png");
public static final UITexture EXTRACTOR_OVERLAY_STEEL = fullImage(
"textures/gui/overlay/extractor_overlay_steel.png");
- public static final UITexture FILTER_SLOT_OVERLAY = fullImage("textures/gui/overlay/filter_slot_overlay.png", true);
+ public static final UITexture FILTER_SLOT_OVERLAY = fullImage("textures/gui/overlay/filter_slot_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture FILTER_SETTINGS_OVERLAY = fullImage(
"textures/gui/overlay/filter_settings_overlay.png");
- public static final UITexture FURNACE_OVERLAY_1 = fullImage("textures/gui/overlay/furnace_overlay_1.png", true);
- public static final UITexture FURNACE_OVERLAY_2 = fullImage("textures/gui/overlay/furnace_overlay_2.png", true);
+ public static final UITexture FURNACE_OVERLAY_1 = fullImage("textures/gui/overlay/furnace_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture FURNACE_OVERLAY_2 = fullImage("textures/gui/overlay/furnace_overlay_2.png",
+ ColorType.DEFAULT);
public static final UITexture FURNACE_OVERLAY_BRONZE = fullImage("textures/gui/overlay/furnace_overlay_bronze.png");
public static final UITexture FURNACE_OVERLAY_STEEL = fullImage("textures/gui/overlay/furnace_overlay_steel.png");
- public static final UITexture HAMMER_OVERLAY = fullImage("textures/gui/overlay/hammer_overlay.png", true);
+ public static final UITexture HAMMER_OVERLAY = fullImage("textures/gui/overlay/hammer_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture HAMMER_OVERLAY_BRONZE = fullImage("textures/gui/overlay/hammer_overlay_bronze.png");
public static final UITexture HAMMER_OVERLAY_STEEL = fullImage("textures/gui/overlay/hammer_overlay_steel.png");
- public static final UITexture HEATING_OVERLAY_1 = fullImage("textures/gui/overlay/heating_overlay_1.png", true);
- public static final UITexture HEATING_OVERLAY_2 = fullImage("textures/gui/overlay/heating_overlay_2.png", true);
- public static final UITexture IMPLOSION_OVERLAY_1 = fullImage("textures/gui/overlay/implosion_overlay_1.png", true);
- public static final UITexture IMPLOSION_OVERLAY_2 = fullImage("textures/gui/overlay/implosion_overlay_2.png", true);
- public static final UITexture IN_SLOT_OVERLAY = fullImage("textures/gui/overlay/in_slot_overlay.png", true);
+ public static final UITexture HEATING_OVERLAY_1 = fullImage("textures/gui/overlay/heating_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture HEATING_OVERLAY_2 = fullImage("textures/gui/overlay/heating_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture IMPLOSION_OVERLAY_1 = fullImage("textures/gui/overlay/implosion_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture IMPLOSION_OVERLAY_2 = fullImage("textures/gui/overlay/implosion_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture IN_SLOT_OVERLAY = fullImage("textures/gui/overlay/in_slot_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture IN_SLOT_OVERLAY_BRONZE = fullImage("textures/gui/overlay/in_slot_overlay_bronze.png");
public static final UITexture IN_SLOT_OVERLAY_STEEL = fullImage("textures/gui/overlay/in_slot_overlay_steel.png");
- public static final UITexture INGOT_OVERLAY = fullImage("textures/gui/overlay/ingot_overlay.png", true);
- public static final UITexture INT_CIRCUIT_OVERLAY = fullImage("textures/gui/overlay/int_circuit_overlay.png", true);
- public static final UITexture LENS_OVERLAY = fullImage("textures/gui/overlay/lens_overlay.png", true);
- public static final UITexture LIGHTNING_OVERLAY_1 = fullImage("textures/gui/overlay/lightning_overlay_1.png", true);
- public static final UITexture LIGHTNING_OVERLAY_2 = fullImage("textures/gui/overlay/lightning_overlay_2.png", true);
- public static final UITexture MOLD_OVERLAY = fullImage("textures/gui/overlay/mold_overlay.png", true);
- public static final UITexture MOLECULAR_OVERLAY_1 = fullImage("textures/gui/overlay/molecular_overlay_1.png", true);
- public static final UITexture MOLECULAR_OVERLAY_2 = fullImage("textures/gui/overlay/molecular_overlay_2.png", true);
- public static final UITexture MOLECULAR_OVERLAY_3 = fullImage("textures/gui/overlay/molecular_overlay_3.png", true);
- public static final UITexture MOLECULAR_OVERLAY_4 = fullImage("textures/gui/overlay/molecular_overlay_4.png", true);
- public static final UITexture OUT_SLOT_OVERLAY = fullImage("textures/gui/overlay/out_slot_overlay.png", true);
+ public static final UITexture INGOT_OVERLAY = fullImage("textures/gui/overlay/ingot_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture INT_CIRCUIT_OVERLAY = fullImage("textures/gui/overlay/int_circuit_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture LENS_OVERLAY = fullImage("textures/gui/overlay/lens_overlay.png", ColorType.DEFAULT);
+ public static final UITexture LIGHTNING_OVERLAY_1 = fullImage("textures/gui/overlay/lightning_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture LIGHTNING_OVERLAY_2 = fullImage("textures/gui/overlay/lightning_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture MOLD_OVERLAY = fullImage("textures/gui/overlay/mold_overlay.png", ColorType.DEFAULT);
+ public static final UITexture MOLECULAR_OVERLAY_1 = fullImage("textures/gui/overlay/molecular_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture MOLECULAR_OVERLAY_2 = fullImage("textures/gui/overlay/molecular_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture MOLECULAR_OVERLAY_3 = fullImage("textures/gui/overlay/molecular_overlay_3.png",
+ ColorType.DEFAULT);
+ public static final UITexture MOLECULAR_OVERLAY_4 = fullImage("textures/gui/overlay/molecular_overlay_4.png",
+ ColorType.DEFAULT);
+ public static final UITexture OUT_SLOT_OVERLAY = fullImage("textures/gui/overlay/out_slot_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture OUT_SLOT_OVERLAY_BRONZE = fullImage(
"textures/gui/overlay/out_slot_overlay_bronze.png");
public static final UITexture OUT_SLOT_OVERLAY_STEEL = fullImage("textures/gui/overlay/out_slot_overlay_steel.png");
- public static final UITexture PAPER_OVERLAY = fullImage("textures/gui/overlay/paper_overlay.png", true);
+ public static final UITexture PAPER_OVERLAY = fullImage("textures/gui/overlay/paper_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture PRINTED_PAPER_OVERLAY = fullImage("textures/gui/overlay/printed_paper_overlay.png",
- true);
- public static final UITexture PIPE_OVERLAY_2 = fullImage("textures/gui/overlay/pipe_overlay_2.png", true);
- public static final UITexture PIPE_OVERLAY_1 = fullImage("textures/gui/overlay/pipe_overlay_1.png", true);
- public static final UITexture PRESS_OVERLAY_1 = fullImage("textures/gui/overlay/press_overlay_1.png", true);
- public static final UITexture PRESS_OVERLAY_2 = fullImage("textures/gui/overlay/press_overlay_2.png", true);
- public static final UITexture PRESS_OVERLAY_3 = fullImage("textures/gui/overlay/press_overlay_3.png", true);
- public static final UITexture PRESS_OVERLAY_4 = fullImage("textures/gui/overlay/press_overlay_4.png", true);
- public static final UITexture SAWBLADE_OVERLAY = fullImage("textures/gui/overlay/sawblade_overlay.png", true);
- public static final UITexture SOLIDIFIER_OVERLAY = fullImage("textures/gui/overlay/solidifier_overlay.png", true);
- public static final UITexture STRING_SLOT_OVERLAY = fullImage("textures/gui/overlay/string_slot_overlay.png", true);
- public static final UITexture TOOL_SLOT_OVERLAY = fullImage("textures/gui/overlay/tool_slot_overlay.png", true);
- public static final UITexture TURBINE_OVERLAY = fullImage("textures/gui/overlay/turbine_overlay.png", true);
- public static final UITexture VIAL_OVERLAY_1 = fullImage("textures/gui/overlay/vial_overlay_1.png", true);
- public static final UITexture VIAL_OVERLAY_2 = fullImage("textures/gui/overlay/vial_overlay_2.png", true);
- public static final UITexture WIREMILL_OVERLAY = fullImage("textures/gui/overlay/wiremill_overlay.png", true);
+ ColorType.DEFAULT);
+ public static final UITexture PIPE_OVERLAY_2 = fullImage("textures/gui/overlay/pipe_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture PIPE_OVERLAY_1 = fullImage("textures/gui/overlay/pipe_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture PRESS_OVERLAY_1 = fullImage("textures/gui/overlay/press_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture PRESS_OVERLAY_2 = fullImage("textures/gui/overlay/press_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture PRESS_OVERLAY_3 = fullImage("textures/gui/overlay/press_overlay_3.png",
+ ColorType.DEFAULT);
+ public static final UITexture PRESS_OVERLAY_4 = fullImage("textures/gui/overlay/press_overlay_4.png",
+ ColorType.DEFAULT);
+ public static final UITexture SAWBLADE_OVERLAY = fullImage("textures/gui/overlay/sawblade_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture SOLIDIFIER_OVERLAY = fullImage("textures/gui/overlay/solidifier_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture STRING_SLOT_OVERLAY = fullImage("textures/gui/overlay/string_slot_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture TOOL_SLOT_OVERLAY = fullImage("textures/gui/overlay/tool_slot_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture TURBINE_OVERLAY = fullImage("textures/gui/overlay/turbine_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture VIAL_OVERLAY_1 = fullImage("textures/gui/overlay/vial_overlay_1.png",
+ ColorType.DEFAULT);
+ public static final UITexture VIAL_OVERLAY_2 = fullImage("textures/gui/overlay/vial_overlay_2.png",
+ ColorType.DEFAULT);
+ public static final UITexture WIREMILL_OVERLAY = fullImage("textures/gui/overlay/wiremill_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture POSITIVE_MATTER_OVERLAY = fullImage(
- "textures/gui/overlay/positive_matter_overlay.png", true);
+ "textures/gui/overlay/positive_matter_overlay.png", ColorType.DEFAULT);
public static final UITexture NEUTRAL_MATTER_OVERLAY = fullImage("textures/gui/overlay/neutral_matter_overlay.png",
- true);
- public static final UITexture DATA_ORB_OVERLAY = fullImage("textures/gui/overlay/data_orb_overlay.png", true);
- public static final UITexture SCANNER_OVERLAY = fullImage("textures/gui/overlay/scanner_overlay.png", true);
- public static final UITexture DUCT_TAPE_OVERLAY = fullImage("textures/gui/overlay/duct_tape_overlay.png", true);
+ ColorType.DEFAULT);
+ public static final UITexture DATA_ORB_OVERLAY = fullImage("textures/gui/overlay/data_orb_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture SCANNER_OVERLAY = fullImage("textures/gui/overlay/scanner_overlay.png",
+ ColorType.DEFAULT);
+ public static final UITexture DUCT_TAPE_OVERLAY = fullImage("textures/gui/overlay/duct_tape_overlay.png",
+ ColorType.DEFAULT);
public static final UITexture RESEARCH_STATION_OVERLAY = fullImage(
- "textures/gui/overlay/research_station_overlay.png", true);
+ "textures/gui/overlay/research_station_overlay.png", ColorType.DEFAULT);
// BUTTONS
@@ -405,7 +464,7 @@ private static String id(String path) {
public static final UITexture BUTTON_BRONZE = new UITexture.Builder()
.location(GTValues.MODID, "textures/gui/widget/buttons.png")
.imageSize(54, 36)
- .uv(18, 0, 18, 18)
+ .xy(18, 0, 18, 18)
.adaptable(2)
.name(IDs.BRONZE_BUTTON)
.build();
@@ -413,7 +472,7 @@ private static String id(String path) {
public static final UITexture BUTTON_BRONZE_SELECTED = new UITexture.Builder()
.location(GTValues.MODID, "textures/gui/widget/buttons.png")
.imageSize(54, 36)
- .uv(18, 18, 18, 18)
+ .xy(18, 18, 18, 18)
.adaptable(2)
.name(IDs.BRONZE_BUTTON_SELECTED)
.build();
@@ -421,7 +480,7 @@ private static String id(String path) {
public static final UITexture BUTTON_STEEL = new UITexture.Builder()
.location(GTValues.MODID, "textures/gui/widget/buttons.png")
.imageSize(54, 36)
- .uv(36, 0, 18, 18)
+ .xy(36, 0, 18, 18)
.adaptable(2)
.name(IDs.STEEL_BUTTON)
.build();
@@ -429,7 +488,7 @@ private static String id(String path) {
public static final UITexture BUTTON_STEEL_SELECTED = new UITexture.Builder()
.location(GTValues.MODID, "textures/gui/widget/buttons.png")
.imageSize(54, 36)
- .uv(36, 18, 18, 18)
+ .xy(36, 18, 18, 18)
.adaptable(2)
.name(IDs.STEEL_BUTTON_SELECTED)
.build();
@@ -454,8 +513,9 @@ private static String id(String path) {
"textures/gui/widget/button_fluid_output_overlay.png");
public static final UITexture BUTTON_AUTO_COLLAPSE = fullImage(
"textures/gui/widget/button_auto_collapse_overlay.png");
- public static final UITexture BUTTON_X = fullImage("textures/gui/widget/button_x_overlay.png", true);
- public static final UITexture BUTTON_CLEAR_GRID = fullImage("textures/gui/widget/button_clear_grid.png", false);
+ public static final UITexture BUTTON_X = fullImage("textures/gui/widget/button_x_overlay.png", ColorType.DEFAULT);
+ public static final UITexture BUTTON_CLEAR_GRID = fullImage("textures/gui/widget/button_clear_grid.png",
+ ColorType.DEFAULT);
public static final UITexture BUTTON_CROSS = fullImage("textures/gui/widget/button_cross.png");
public static final UITexture BUTTON_REDSTONE_ON = fullImage("textures/gui/widget/button_redstone_on.png");
@@ -465,8 +525,8 @@ private static String id(String path) {
* 0 = OFF
* 1 = ON
*/
- public static final UITexture[] BUTTON_POWER = slice("textures/gui/widget/button_power.png",
- 18, 36, 18, 18, false);
+ public static final UITexture[] BUTTON_POWER = slice("textures/gui/widget/button_power.png", 18, 36, 18, 18,
+ ColorType.DEFAULT);
public static final UITexture BUTTON_POWER_DETAIL = fullImage("textures/gui/widget/button_power_detail.png");
@@ -476,8 +536,8 @@ private static String id(String path) {
* 2 = FLUID VOID
* 3 = VOID BOTH
**/
- public static final UITexture[] MULTIBLOCK_VOID = slice("textures/gui/widget/button_void_multiblock.png",
- 18, 72, 18, 18, false);
+ public static final UITexture[] MULTIBLOCK_VOID = slice("textures/gui/widget/button_void_multiblock.png", 18, 72,
+ 18, 18, ColorType.DEFAULT);
public static final UITexture OVERLAY_VOID_NONE = fullImage("textures/gui/widget/button_void_none.png");
@@ -485,104 +545,102 @@ private static String id(String path) {
* 0 = DISABLED
* 1 = ENABLED
*/
- public static final UITexture[] OVERLAY_DISTINCT_BUSES = slice("textures/gui/widget/button_distinct_buses.png",
- 18, 36, 18, 18, false);
+ public static final UITexture[] OVERLAY_DISTINCT_BUSES = slice("textures/gui/widget/button_distinct_buses.png", 18,
+ 36, 18, 18);
- public static final UITexture OVERLAY_NO_FLEX = fullImage("textures/gui/widget/button_no_flex.png", false);
- public static final UITexture BUTTON_MULTI_MAP = fullImage("textures/gui/widget/button_multi_map.png", true);
- public static final UITexture BUTTON_MINER_MODES = fullImage("textures/gui/widget/button_miner_modes.png", true);
- public static final UITexture BUTTON_THROTTLE_MINUS = fullImage("textures/gui/widget/button_throttle_minus.png",
- true); // TODO new texture
- public static final UITexture BUTTON_THROTTLE_PLUS = fullImage("textures/gui/widget/button_throttle_plus.png",
- true); // TODO remove this
+ public static final UITexture OVERLAY_NO_FLEX = fullImage("textures/gui/widget/button_no_flex.png");
+ public static final UITexture BUTTON_MULTI_MAP = fullImage("textures/gui/widget/button_multi_map.png",
+ ColorType.DEFAULT);
+ public static final UITexture BUTTON_MINER_MODES = fullImage("textures/gui/widget/button_miner_modes.png",
+ ColorType.DEFAULT);
// PROGRESS BARS
public static final UITexture PROGRESS_BAR_ARC_FURNACE = progressBar(
- "textures/gui/progress_bar/progress_bar_arc_furnace.png", true);
+ "textures/gui/progress_bar/progress_bar_arc_furnace.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_ARROW = progressBar("textures/gui/progress_bar/progress_bar_arrow.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_ARROW_BRONZE = progressBar(
"textures/gui/progress_bar/progress_bar_arrow_bronze.png");
public static final UITexture PROGRESS_BAR_ARROW_STEEL = progressBar(
"textures/gui/progress_bar/progress_bar_arrow_steel.png");
public static final UITexture PROGRESS_BAR_ARROW_MULTIPLE = progressBar(
- "textures/gui/progress_bar/progress_bar_arrow_multiple.png", true);
+ "textures/gui/progress_bar/progress_bar_arrow_multiple.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_BATH = progressBar("textures/gui/progress_bar/progress_bar_bath.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_BENDING = progressBar(
- "textures/gui/progress_bar/progress_bar_bending.png", true);
+ "textures/gui/progress_bar/progress_bar_bending.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_CANNER = progressBar("textures/gui/progress_bar/progress_bar_canner.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_CIRCUIT = progressBar(
- "textures/gui/progress_bar/progress_bar_circuit.png", true);
+ "textures/gui/progress_bar/progress_bar_circuit.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_CIRCUIT_ASSEMBLER = progressBar(
- "textures/gui/progress_bar/progress_bar_circuit_assembler.png", true);
+ "textures/gui/progress_bar/progress_bar_circuit_assembler.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_COMPRESS = progressBar(
- "textures/gui/progress_bar/progress_bar_compress.png", true);
+ "textures/gui/progress_bar/progress_bar_compress.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_COMPRESS_BRONZE = progressBar(
"textures/gui/progress_bar/progress_bar_compress_bronze.png");
public static final UITexture PROGRESS_BAR_COMPRESS_STEEL = progressBar(
"textures/gui/progress_bar/progress_bar_compress_steel.png");
public static final UITexture PROGRESS_BAR_CRACKING = progressBar(
- "textures/gui/progress_bar/progress_bar_cracking.png", true);
+ "textures/gui/progress_bar/progress_bar_cracking.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_CRACKING_INPUT = progressBar(
- "textures/gui/progress_bar/progress_bar_cracking_2.png", 21, 38, true);
+ "textures/gui/progress_bar/progress_bar_cracking_2.png", 21, 38, ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_CRYSTALLIZATION = progressBar(
- "textures/gui/progress_bar/progress_bar_crystallization.png", true);
+ "textures/gui/progress_bar/progress_bar_crystallization.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_EXTRACT = progressBar(
- "textures/gui/progress_bar/progress_bar_extract.png", true);
+ "textures/gui/progress_bar/progress_bar_extract.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_EXTRACT_BRONZE = progressBar(
"textures/gui/progress_bar/progress_bar_extract_bronze.png");
public static final UITexture PROGRESS_BAR_EXTRACT_STEEL = progressBar(
"textures/gui/progress_bar/progress_bar_extract_steel.png");
public static final UITexture PROGRESS_BAR_EXTRUDER = progressBar(
- "textures/gui/progress_bar/progress_bar_extruder.png", true);
+ "textures/gui/progress_bar/progress_bar_extruder.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_FUSION = progressBar("textures/gui/progress_bar/progress_bar_fusion.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_GAS_COLLECTOR = progressBar(
- "textures/gui/progress_bar/progress_bar_gas_collector.png", true);
+ "textures/gui/progress_bar/progress_bar_gas_collector.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_HAMMER = progressBar("textures/gui/progress_bar/progress_bar_hammer.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_HAMMER_BRONZE = progressBar(
"textures/gui/progress_bar/progress_bar_hammer_bronze.png");
public static final UITexture PROGRESS_BAR_HAMMER_STEEL = progressBar(
"textures/gui/progress_bar/progress_bar_hammer_steel.png");
public static final UITexture PROGRESS_BAR_HAMMER_BASE = fullImage(
- "textures/gui/progress_bar/progress_bar_hammer_base.png", true);
+ "textures/gui/progress_bar/progress_bar_hammer_base.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_HAMMER_BASE_BRONZE = fullImage(
"textures/gui/progress_bar/progress_bar_hammer_base_bronze.png");
public static final UITexture PROGRESS_BAR_HAMMER_BASE_STEEL = fullImage(
"textures/gui/progress_bar/progress_bar_hammer_base_steel.png");
public static final UITexture PROGRESS_BAR_LATHE = progressBar("textures/gui/progress_bar/progress_bar_lathe.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_LATHE_BASE = fullImage(
- "textures/gui/progress_bar/progress_bar_lathe_base.png", true);
+ "textures/gui/progress_bar/progress_bar_lathe_base.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_MACERATE = progressBar(
- "textures/gui/progress_bar/progress_bar_macerate.png", true);
+ "textures/gui/progress_bar/progress_bar_macerate.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_MACERATE_BRONZE = progressBar(
"textures/gui/progress_bar/progress_bar_macerate_bronze.png");
public static final UITexture PROGRESS_BAR_MACERATE_STEEL = progressBar(
"textures/gui/progress_bar/progress_bar_macerate_steel.png");
public static final UITexture PROGRESS_BAR_MAGNET = progressBar("textures/gui/progress_bar/progress_bar_magnet.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_MASS_FAB = progressBar(
- "textures/gui/progress_bar/progress_bar_mass_fab.png", true);
+ "textures/gui/progress_bar/progress_bar_mass_fab.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_MIXER = progressBar("textures/gui/progress_bar/progress_bar_mixer.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_PACKER = progressBar("textures/gui/progress_bar/progress_bar_packer.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_RECYCLER = progressBar(
- "textures/gui/progress_bar/progress_bar_recycler.png", true);
+ "textures/gui/progress_bar/progress_bar_recycler.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_REPLICATOR = progressBar(
- "textures/gui/progress_bar/progress_bar_replicator.png", true);
+ "textures/gui/progress_bar/progress_bar_replicator.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_SIFT = progressBar("textures/gui/progress_bar/progress_bar_sift.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_SLICE = progressBar("textures/gui/progress_bar/progress_bar_slice.png",
- true);
+ ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_UNPACKER = progressBar(
- "textures/gui/progress_bar/progress_bar_unpacker.png", true);
+ "textures/gui/progress_bar/progress_bar_unpacker.png", ColorType.DEFAULT);
public static final UITexture PROGRESS_BAR_WIREMILL = progressBar(
- "textures/gui/progress_bar/progress_bar_wiremill.png", true);
+ "textures/gui/progress_bar/progress_bar_wiremill.png", ColorType.DEFAULT);
// more custom progress bars
// MULTIBLOCK BARS
@@ -647,16 +705,21 @@ private static String id(String path) {
public static void init() {/**/}
private static UITexture fullImage(String path) {
- return fullImage(path, false);
+ return fullImage(path, null);
}
- private static UITexture fullImage(String path, boolean canApplyTheme) {
- return UITexture.fullImage(GTValues.MODID, path, canApplyTheme);
+ private static UITexture fullImage(String path, @Nullable ColorType colorType) {
+ return UITexture.fullImage(GTValues.MODID, path, colorType);
+ }
+
+ @SuppressWarnings("SameParameterValue")
+ private static UITexture[] slice(String path, int imageWidth, int imageHeight, int sliceWidth, int sliceHeight) {
+ return slice(path, imageWidth, imageHeight, sliceWidth, sliceHeight, null);
}
@SuppressWarnings("SameParameterValue")
private static UITexture[] slice(String path, int imageWidth, int imageHeight, int sliceWidth, int sliceHeight,
- boolean canApplyTheme) {
+ @Nullable ColorType colorType) {
if (imageWidth % sliceWidth != 0 || imageHeight % sliceHeight != 0)
throw new IllegalArgumentException("Slice height and slice width must divide the image evenly!");
@@ -668,42 +731,51 @@ private static UITexture[] slice(String path, int imageWidth, int imageHeight, i
for (int indexY = 0; indexY < countY; indexY++) {
slices[(indexX * countX) + indexY] = UITexture.builder()
.location(GTValues.MODID, path)
- .canApplyTheme(canApplyTheme)
+ .colorType(colorType)
.imageSize(imageWidth, imageHeight)
- .uv(indexX * sliceWidth, indexY * sliceHeight, sliceWidth, sliceHeight)
+ .xy(indexX * sliceWidth, indexY * sliceHeight, sliceWidth, sliceHeight)
.build();
}
}
return slices;
}
- private static UITexture[] slice(String path, int imageWidth, int imageHeight, boolean canApplyTheme) {
+ private static UITexture[] slice(String path, int imageWidth, int imageHeight) {
+ return slice(path, imageWidth, imageHeight, null);
+ }
+
+ private static UITexture[] slice(String path, int imageWidth, int imageHeight, @Nullable ColorType colorType) {
int sliceSize = Math.min(imageWidth, imageHeight);
- return slice(path, imageWidth, imageHeight, sliceSize, sliceSize, canApplyTheme);
+ return slice(path, imageWidth, imageHeight, sliceSize, sliceSize, colorType);
+ }
+
+ private static IDrawable animated(String path, int imageWidth, int imageHeight, int rate) {
+ return dynamic(slice(path, imageWidth, imageHeight, null), rate);
}
- private static IDrawable animated(String path, int imageWidth, int imageHeight, boolean canApplyTheme, int rate) {
- return dynamic(slice(path, imageWidth, imageHeight, canApplyTheme), rate);
+ private static IDrawable animated(String path, int imageWidth, int imageHeight, @Nullable ColorType colorType,
+ int rate) {
+ return dynamic(slice(path, imageWidth, imageHeight, colorType), rate);
}
private static UITexture progressBar(String path) {
- return progressBar(path, 20, 40, false);
+ return progressBar(path, 20, 40);
}
- private static UITexture progressBar(String path, boolean canApplyTheme) {
- return progressBar(path, 20, 40, canApplyTheme);
+ private static UITexture progressBar(String path, @Nullable ColorType colorType) {
+ return progressBar(path, 20, 40, colorType);
}
private static UITexture progressBar(String path, int width, int height) {
- return progressBar(path, width, height, false);
+ return progressBar(path, width, height, null);
}
- private static UITexture progressBar(String path, int width, int height, boolean canApplyTheme) {
- UITexture.Builder builder = new UITexture.Builder()
+ private static UITexture progressBar(String path, int width, int height, @Nullable ColorType colorType) {
+ return new UITexture.Builder()
.location(GTValues.MODID, path)
- .imageSize(width, height);
- if (canApplyTheme) builder.canApplyTheme();
- return builder.build();
+ .imageSize(width, height)
+ .colorType(colorType)
+ .build();
}
// todo steam logos? multi indicator blinking logos?
diff --git a/src/main/java/gregtech/api/mui/GTGuis.java b/src/main/java/gregtech/api/mui/GTGuis.java
index f955cd922f8..a8301981eaa 100644
--- a/src/main/java/gregtech/api/mui/GTGuis.java
+++ b/src/main/java/gregtech/api/mui/GTGuis.java
@@ -108,7 +108,7 @@ private PopupPanel(@NotNull String name) {
child(ButtonWidget.panelCloseButton().top(5).right(5)
.onMousePressed(mouseButton -> {
if (mouseButton == 0 || mouseButton == 1) {
- this.closeIfOpen(true);
+ this.closeIfOpen();
return true;
}
return false;
diff --git a/src/main/java/gregtech/api/mui/IconAcessor.java b/src/main/java/gregtech/api/mui/IconAcessor.java
deleted file mode 100644
index 2bf4218904f..00000000000
--- a/src/main/java/gregtech/api/mui/IconAcessor.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package gregtech.api.mui;
-
-import com.cleanroommc.modularui.api.drawable.IDrawable;
-
-public interface IconAcessor {
-
- IDrawable gregTech$getDrawable();
-}
diff --git a/src/main/java/gregtech/api/mui/drawable/GTObjectDrawable.java b/src/main/java/gregtech/api/mui/drawable/GTObjectDrawable.java
index 2a562ae63b0..def024b35bf 100644
--- a/src/main/java/gregtech/api/mui/drawable/GTObjectDrawable.java
+++ b/src/main/java/gregtech/api/mui/drawable/GTObjectDrawable.java
@@ -11,25 +11,29 @@
import com.cleanroommc.modularui.drawable.GuiDraw;
import com.cleanroommc.modularui.drawable.Icon;
import com.cleanroommc.modularui.drawable.text.TextRenderer;
-import com.cleanroommc.modularui.integration.jei.JeiIngredientProvider;
+import com.cleanroommc.modularui.integration.recipeviewer.RecipeViewerIngredientProvider;
import com.cleanroommc.modularui.screen.viewport.GuiContext;
import com.cleanroommc.modularui.screen.viewport.ModularGuiContext;
-import com.cleanroommc.modularui.theme.WidgetSlotTheme;
+import com.cleanroommc.modularui.theme.SlotTheme;
import com.cleanroommc.modularui.theme.WidgetTheme;
import com.cleanroommc.modularui.utils.Alignment;
import com.cleanroommc.modularui.utils.Color;
import com.cleanroommc.modularui.widget.Widget;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.function.Function;
+import java.util.function.Predicate;
-public class GTObjectDrawable implements IDrawable, JeiIngredientProvider {
+public class GTObjectDrawable implements IDrawable, RecipeViewerIngredientProvider {
private static final TextRenderer renderer = new TextRenderer();
private final Object object;
private final long amount;
private Function, Integer> boostFunction;
+ @NotNull
+ private Predicate