aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java36
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java6
2 files changed, 20 insertions, 22 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java
index fd5a806..75975b2 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java
@@ -1,38 +1,37 @@
package io.github.cottonmc.cotton.gui.impl.client;
-import io.github.cottonmc.cotton.gui.impl.mixin.client.SliderWidgetAccessor;
-
import net.minecraft.client.gui.screen.ButtonTextures;
import net.minecraft.util.Identifier;
import io.github.cottonmc.cotton.gui.impl.LibGuiCommon;
import io.github.cottonmc.cotton.gui.impl.mixin.client.PressableWidgetAccessor;
+import io.github.cottonmc.cotton.gui.impl.mixin.client.SliderWidgetAccessor;
public final class WidgetTextures {
private static final ButtonTextures LIGHT_LABELED_SLIDER_HANDLE = new ButtonTextures(
- SliderWidgetAccessor.libgui$getHandleTexture(),
- SliderWidgetAccessor.libgui$getHandleHighlightedTexture()
+ SliderWidgetAccessor.libgui$getHandleTexture(),
+ SliderWidgetAccessor.libgui$getHandleHighlightedTexture()
);
private static final ButtonTextures DARK_LABELED_SLIDER_HANDLE = new ButtonTextures(
- id("widget/slider_handle_dark"),
- id("widget/slider_handle_highlighted_dark")
+ id("widget/slider_handle_dark"),
+ id("widget/slider_handle_highlighted_dark")
);
private static final ButtonTextures DARK_BUTTON = new ButtonTextures(
- id("widget/button_dark"),
- id("widget/button_disabled_dark"),
- id("widget/button_highlighted_dark")
+ id("widget/button_dark"),
+ id("widget/button_disabled_dark"),
+ id("widget/button_highlighted_dark")
);
private static final ScrollBarTextures LIGHT_SCROLL_BAR = new ScrollBarTextures(
- id("widget/scroll_bar/background_light"),
- id("widget/scroll_bar/thumb_light"),
- id("widget/scroll_bar/thumb_pressed_light"),
- id("widget/scroll_bar/thumb_hovered_light")
+ id("widget/scroll_bar/background_light"),
+ id("widget/scroll_bar/thumb_light"),
+ id("widget/scroll_bar/thumb_pressed_light"),
+ id("widget/scroll_bar/thumb_hovered_light")
);
private static final ScrollBarTextures DARK_SCROLL_BAR = new ScrollBarTextures(
- id("widget/scroll_bar/background_dark"),
- id("widget/scroll_bar/thumb_dark"),
- id("widget/scroll_bar/thumb_pressed_dark"),
- id("widget/scroll_bar/thumb_hovered_dark")
+ id("widget/scroll_bar/background_dark"),
+ id("widget/scroll_bar/thumb_dark"),
+ id("widget/scroll_bar/thumb_pressed_dark"),
+ id("widget/scroll_bar/thumb_hovered_dark")
);
public static ButtonTextures getButtonTextures(boolean dark) {
@@ -51,6 +50,7 @@ public final class WidgetTextures {
return new Identifier(LibGuiCommon.MOD_ID, path);
}
- public record ScrollBarTextures(Identifier background, Identifier thumb, Identifier thumbPressed, Identifier thumbHovered) {
+ public record ScrollBarTextures(Identifier background, Identifier thumb, Identifier thumbPressed,
+ Identifier thumbHovered) {
}
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
index 467a634..3a2f967 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
@@ -1,19 +1,17 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.impl.client.WidgetTextures;
-import io.github.cottonmc.cotton.gui.impl.mixin.client.SliderWidgetAccessor;
-
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
import net.minecraft.client.gui.screen.narration.NarrationPart;
import net.minecraft.text.Text;
-import net.minecraft.util.Identifier;
import net.minecraft.util.math.RotationAxis;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.impl.client.NarrationMessages;
+import io.github.cottonmc.cotton.gui.impl.client.WidgetTextures;
+import io.github.cottonmc.cotton.gui.impl.mixin.client.SliderWidgetAccessor;
import io.github.cottonmc.cotton.gui.widget.data.Axis;
import io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment;
import org.jetbrains.annotations.Nullable;