aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java8
-rw-r--r--src/main/resources/assets/libgui/textures/widget/kirb.png (renamed from src/main/resources/assets/libgui/widget/kirb.png)bin7026 -> 7026 bytes
-rw-r--r--src/main/resources/assets/libgui/textures/widget/toggle_off.pngbin0 -> 162 bytes
-rw-r--r--src/main/resources/assets/libgui/textures/widget/toggle_on.pngbin0 -> 3181 bytes
-rw-r--r--src/main/resources/assets/libgui/widget/toggle_off.pngbin288 -> 0 bytes
-rw-r--r--src/main/resources/assets/libgui/widget/toggle_on.pngbin296 -> 0 bytes
8 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
index 15c39dd..e114131 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java
@@ -5,7 +5,6 @@ import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription;
import io.github.cottonmc.cotton.gui.widget.WButton;
import io.github.cottonmc.cotton.gui.widget.WGridPanel;
-import io.github.cottonmc.cotton.gui.widget.WTextField;
import io.github.cottonmc.cotton.gui.widget.WToggleButton;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
@@ -29,8 +28,6 @@ public class ConfigGui extends LightweightGuiDescription {
root.add(new WKirbSprite(), 5, 4);
- root.add(new WTextField(), 0, 3, 5, 1);
-
WButton doneButton = new WButton(new TranslatableText("gui.done"));
doneButton.setOnClick(()->{
MinecraftClient.getInstance().openScreen(previous);
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
index a51ecb5..d68b1db 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/WKirbSprite.java
@@ -10,7 +10,7 @@ import net.fabricmc.api.Environment;
import net.minecraft.util.Identifier;
public class WKirbSprite extends WWidget {
- private static final Identifier KIRB = new Identifier("libgui:widget/kirb.png");
+ private static final Identifier KIRB = new Identifier("libgui:textures/widget/kirb.png");
private static final float PX = 1f/416f;
private static final float KIRB_WIDTH = 32*PX;
@@ -98,7 +98,7 @@ public class WKirbSprite extends WWidget {
}
float offset = KIRB_WIDTH * currentFrame;
- ScreenDrawing.rect(KIRB, x, y, 32, 32, offset, 0, offset+KIRB_WIDTH, 1, 0xFFFFFFFF);
+ ScreenDrawing.rect(KIRB, x, y+8, 32, 32, offset, 0, offset+KIRB_WIDTH, 1, 0xFFFFFFFF);
long elapsed = now - lastFrame;
currentFrameTime += elapsed;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
index 5f1f568..846f032 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java
@@ -66,8 +66,8 @@ public class WToggleButton extends WWidget {
Text label = null;
/** Default On / Off Images */
- protected final static Identifier DEFAULT_OFF_IMAGE = new Identifier("libgui:widget/toggle_off.png");
- protected final static Identifier DEFAULT_ON_IMAGE = new Identifier("libgui:widget/toggle_on.png");
+ protected final static Identifier DEFAULT_OFF_IMAGE = new Identifier("libgui:textures/widget/toggle_off.png");
+ protected final static Identifier DEFAULT_ON_IMAGE = new Identifier("libgui:textures/widget/toggle_on.png");
protected Identifier onImage;
protected Identifier offImage;
@@ -87,11 +87,11 @@ public class WToggleButton extends WWidget {
@Override
public void paintBackground(int x, int y) {
- ScreenDrawing.rect(isOn ? DEFAULT_ON_IMAGE : DEFAULT_OFF_IMAGE, x, y, width, height, 0xFFFFFFFF);
+ ScreenDrawing.rect(isOn ? DEFAULT_ON_IMAGE : DEFAULT_OFF_IMAGE, x, y, 18, 18, 0xFFFFFFFF);
if (label!=null) {
- ScreenDrawing.drawString(label.asFormattedString(), x + 20, y+1, LibGuiClient.config.darkMode ? darkmodeColor : color);
+ ScreenDrawing.drawString(label.asFormattedString(), x + 22, y+6, LibGuiClient.config.darkMode ? darkmodeColor : color);
}
}
diff --git a/src/main/resources/assets/libgui/widget/kirb.png b/src/main/resources/assets/libgui/textures/widget/kirb.png
index eea2fc9..eea2fc9 100644
--- a/src/main/resources/assets/libgui/widget/kirb.png
+++ b/src/main/resources/assets/libgui/textures/widget/kirb.png
Binary files differ
diff --git a/src/main/resources/assets/libgui/textures/widget/toggle_off.png b/src/main/resources/assets/libgui/textures/widget/toggle_off.png
new file mode 100644
index 0000000..d62d86b
--- /dev/null
+++ b/src/main/resources/assets/libgui/textures/widget/toggle_off.png
Binary files differ
diff --git a/src/main/resources/assets/libgui/textures/widget/toggle_on.png b/src/main/resources/assets/libgui/textures/widget/toggle_on.png
new file mode 100644
index 0000000..aabd040
--- /dev/null
+++ b/src/main/resources/assets/libgui/textures/widget/toggle_on.png
Binary files differ
diff --git a/src/main/resources/assets/libgui/widget/toggle_off.png b/src/main/resources/assets/libgui/widget/toggle_off.png
deleted file mode 100644
index 18c7ed0..0000000
--- a/src/main/resources/assets/libgui/widget/toggle_off.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/libgui/widget/toggle_on.png b/src/main/resources/assets/libgui/widget/toggle_on.png
deleted file mode 100644
index 94450d4..0000000
--- a/src/main/resources/assets/libgui/widget/toggle_on.png
+++ /dev/null
Binary files differ