From 5a61ad7f353a944cc3990d4cd1470b9347689a84 Mon Sep 17 00:00:00 2001 From: yurisuika Date: Wed, 10 Jan 2024 08:45:33 -0800 Subject: [PATCH] change slider to max quarter of screen height + improve lang wording --- build.gradle | 2 +- gradle.properties | 4 ++-- .../raised/client/gui/screen/RaisedScreen.java | 4 ++-- src/main/resources/assets/raised/lang/en_us.json | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index e1a0ef10..e21dd77c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.4-SNAPSHOT" + id "fabric-loom" version "1.5-SNAPSHOT" id "maven-publish" } diff --git a/gradle.properties b/gradle.properties index 341df121..e1e571df 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G loom.platform = fabric minecraft_version = 1.20.4 -yarn_mappings = 1.20.4+build.2 +yarn_mappings = 1.20.4+build.3 loader_version = 0.15.3 mod_id = raised @@ -11,4 +11,4 @@ mod_version = 3.1.1 maven_group = dev.yurisuika.raised archives_base_name = raised -fabric_version = 0.91.3+1.20.4 \ No newline at end of file +fabric_version = 0.92.1+1.20.4 \ No newline at end of file diff --git a/src/main/java/dev/yurisuika/raised/client/gui/screen/RaisedScreen.java b/src/main/java/dev/yurisuika/raised/client/gui/screen/RaisedScreen.java index aefee85b..6be9a62b 100644 --- a/src/main/java/dev/yurisuika/raised/client/gui/screen/RaisedScreen.java +++ b/src/main/java/dev/yurisuika/raised/client/gui/screen/RaisedScreen.java @@ -26,8 +26,8 @@ public void init() { GridWidget gridWidget = new GridWidget(); gridWidget.getMainPositioner().margin(0, 0, 4, 4); GridWidget.Adder adder = gridWidget.createAdder(2); - adder.add(new SimpleOption<>("options.raised.hud", SimpleOption.constantTooltip(Text.translatable("options.raised.hud.tooltip")), (prefix, value) -> value == 0 ? GameOptions.getGenericValueText(prefix, ScreenTexts.OFF) : GameOptions.getGenericValueText(prefix, Text.literal(String.valueOf(value))), new SimpleOption.ValidatingIntSliderCallbacks(0, client.getWindow().getScaledHeight() / 2), getHud(), RaisedConfig::setHud).createWidget(client.options, 0, 0, 200), 2); - adder.add(new SimpleOption<>("options.raised.chat", SimpleOption.constantTooltip(Text.translatable("options.raised.chat.tooltip")), (prefix, value) -> value == 0 ? GameOptions.getGenericValueText(prefix, ScreenTexts.OFF) : GameOptions.getGenericValueText(prefix, Text.literal(String.valueOf(value))), new SimpleOption.ValidatingIntSliderCallbacks(0, client.getWindow().getScaledHeight() / 2), getChat(), RaisedConfig::setChat).createWidget(client.options, 0, 0, 200), 2); + adder.add(new SimpleOption<>("options.raised.hud", SimpleOption.constantTooltip(Text.translatable("options.raised.hud.tooltip")), (prefix, value) -> value == 0 ? GameOptions.getGenericValueText(prefix, ScreenTexts.OFF) : GameOptions.getGenericValueText(prefix, Text.literal(String.valueOf(value))), new SimpleOption.ValidatingIntSliderCallbacks(0, client.getWindow().getScaledHeight() / 4), getHud(), RaisedConfig::setHud).createWidget(client.options, 0, 0, 200), 2); + adder.add(new SimpleOption<>("options.raised.chat", SimpleOption.constantTooltip(Text.translatable("options.raised.chat.tooltip")), (prefix, value) -> value == 0 ? GameOptions.getGenericValueText(prefix, ScreenTexts.OFF) : GameOptions.getGenericValueText(prefix, Text.literal(String.valueOf(value))), new SimpleOption.ValidatingIntSliderCallbacks(0, client.getWindow().getScaledHeight() / 4), getChat(), RaisedConfig::setChat).createWidget(client.options, 0, 0, 200), 2); adder.add(SimpleOption.ofBoolean("options.raised.support", SimpleOption.constantTooltip(Text.translatable("options.raised.support.tooltip")), getSupport(), RaisedConfig::setSupport).createWidget(client.options, 0, 0, 98)); adder.add(SimpleOption.ofBoolean("options.raised.sync", SimpleOption.constantTooltip(Text.translatable("options.raised.sync.tooltip")), getSync(), RaisedConfig::setSync).createWidget(client.options, 0, 0, 98)); adder.add(SimpleOption.ofBoolean("options.raised.share", SimpleOption.constantTooltip(Text.translatable("options.raised.share.tooltip")), getShare(), RaisedConfig::setShare).createWidget(client.options, 0, 0, 200), 2); diff --git a/src/main/resources/assets/raised/lang/en_us.json b/src/main/resources/assets/raised/lang/en_us.json index 7b1993ed..331f9c0c 100644 --- a/src/main/resources/assets/raised/lang/en_us.json +++ b/src/main/resources/assets/raised/lang/en_us.json @@ -6,11 +6,11 @@ "commands.raised.config.reload": "Raised config reloaded", "commands.raised.config.reset": "Raised config reset to defaults", - "commands.raised.value.hud.query": "HUD height is currently set to: %d", - "commands.raised.value.hud.set": "HUD height is now set to: %d", + "commands.raised.value.hud.query": "HUD offset is currently set to: %d", + "commands.raised.value.hud.set": "HUD offset is now set to: %d", - "commands.raised.value.chat.query": "Chat height is currently set to: %d", - "commands.raised.value.chat.set": "Chat height is now set to: %d", + "commands.raised.value.chat.query": "Chat offset is currently set to: %d", + "commands.raised.value.chat.set": "Chat offset is now set to: %d", "commands.raised.toggle.share.query": "Fabric mod support is currently set to: %d", "commands.raised.toggle.share.set": "Fabric mod support is now set to: %d", @@ -24,10 +24,10 @@ "options.raised.title": "Raised Options", "options.raised.hud": "HUD", - "options.raised.hud.tooltip": "Controls the HUD height.\nMaximum value is half of current scaled screen height.", + "options.raised.hud.tooltip": "Controls the HUD offset.\nMaximum value is a quarter of current scaled screen height.", "options.raised.chat": "Chat", - "options.raised.chat.tooltip": "Controls the Chat height.\nMaximum value is half of current scaled screen height.", + "options.raised.chat.tooltip": "Controls the Chat offset.\nMaximum value is a quarter of current scaled screen height.", "options.raised.share": "Share", "options.raised.share.tooltip": "Enables Fabric mod support.\nAdds support for mod elements using Object Share on Fabric.", @@ -36,5 +36,5 @@ "options.raised.support.tooltip": "Enables extended mod support.\nAdds support for mod elements not associated with vanilla HUD elements.", "options.raised.sync": "Sync", - "options.raised.sync.tooltip": "Enables HUD/Chat sync.\nSynchronizes the chat height to the HUD height." + "options.raised.sync.tooltip": "Enables HUD/Chat sync.\nSynchronizes the chat offset to the HUD offset." } \ No newline at end of file