Skip to content

Commit

Permalink
change slider to max quarter of screen height + improve lang wording
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisuika committed Jan 10, 2024
1 parent 5df8a3a commit 5a61ad7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.4-SNAPSHOT"
id "fabric-loom" version "1.5-SNAPSHOT"
id "maven-publish"
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
fabric_version = 0.92.1+1.20.4
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/assets/raised/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.",
Expand All @@ -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."
}

0 comments on commit 5a61ad7

Please sign in to comment.