diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-09-09 22:28:53 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-09-09 22:28:53 +0300 |
commit | d25b9444c277461c0d2effdff72d2d70d7792b6f (patch) | |
tree | 0844bb3fcef5efb821911d69657dd6917a50b2d4 | |
parent | 5741cdd02b7b7b304bb44fb788900f1cf0097fc2 (diff) | |
download | LibGui-d25b9444c277461c0d2effdff72d2d70d7792b6f.tar.gz LibGui-d25b9444c277461c0d2effdff72d2d70d7792b6f.tar.bz2 LibGui-d25b9444c277461c0d2effdff72d2d70d7792b6f.zip |
Fix code style
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/impl/client/WidgetTextures.java | 36 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java | 6 |
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; |