Skip to content

Commit

Permalink
Follow-up to progressbar addition code (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune authored Dec 4, 2023
1 parent 73db241 commit 148d7a5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
api("com.github.GTNewHorizons:CropLoadCore:0.1.10:dev")
api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")

devOnlyNonPublishable("com.github.GTNewHorizons:GT5-Unofficial:5.09.44.96:dev")
devOnlyNonPublishable("com.github.GTNewHorizons:GT5-Unofficial:5.09.44.97:dev")
compileOnly(deobf("https://media.forgecdn.net/files/2499/612/BiomesOPlenty-1.7.10-2.1.0.2308-universal.jar"))
compileOnly("com.github.GTNewHorizons:twilightforest:2.5.1:dev") {
transitive = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@
import net.minecraftforge.common.util.ForgeDirection;

import com.github.bartimaeusnek.cropspp.GTHandler.CPP_UITextures;
import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.math.Size;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;

import gregtech.api.enums.GT_Values;
Expand Down Expand Up @@ -183,12 +180,12 @@ public boolean allowSelectCircuit() {
return true;
}

private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("crop_gene_extractor", GT_UITextures.PROGRESSBAR_ARROW);

@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
super.addUIWidgets(builder, buildContext);
builder.widget(
new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20)
.setDirection(ProgressBar.Direction.RIGHT).setPos(new Pos2d(78, 24)).setSize(new Size(20, 18)));
protected BasicUIProperties getUIProperties() {
return super.getUIProperties().toBuilder().progressBarTexture(progressBarTexture).build();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@
import net.minecraftforge.common.util.ForgeDirection;

import com.github.bartimaeusnek.cropspp.GTHandler.CPP_UITextures;
import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.math.Size;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;

import gregtech.api.enums.GT_Values;
Expand All @@ -39,6 +36,7 @@
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.recipe.BasicUIProperties;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import ic2.api.crops.CropCard;
Expand Down Expand Up @@ -166,12 +164,12 @@ public boolean useModularUI() {
return true;
}

private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("crop_replicator", GT_UITextures.PROGRESSBAR_ARROW);

@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
super.addUIWidgets(builder, buildContext);
builder.widget(
new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20)
.setDirection(ProgressBar.Direction.RIGHT).setPos(new Pos2d(78, 24)).setSize(new Size(20, 18)));
protected BasicUIProperties getUIProperties() {
return super.getUIProperties().toBuilder().progressBarTexture(progressBarTexture).build();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.math.Size;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;

import gregtech.api.enums.GT_Values;
Expand All @@ -40,6 +37,7 @@
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.recipe.BasicUIProperties;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
Expand Down Expand Up @@ -199,12 +197,12 @@ public boolean useModularUI() {
return true;
}

private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("crop_synthesiser", GT_UITextures.PROGRESSBAR_ARROW);

@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
super.addUIWidgets(builder, buildContext);
builder.widget(
new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20)
.setDirection(ProgressBar.Direction.RIGHT).setPos(new Pos2d(78, 24)).setSize(new Size(20, 18)));
protected BasicUIProperties getUIProperties() {
return super.getUIProperties().toBuilder().progressBarTexture(progressBarTexture).build();
}

@Override
Expand Down

0 comments on commit 148d7a5

Please sign in to comment.