Compare commits
2 commits
f9cb3c0537
...
d62ae7be34
Author | SHA1 | Date | |
---|---|---|---|
d62ae7be34 | |||
420a5f120b |
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,11 @@
|
|||
# Upcoming changes
|
||||
|
||||
Update TBM\_Config.toml to have haste\_speed and slow\_speed for all mob
|
||||
entries.
|
||||
|
||||
Update ClientConfigGui to quit to mod-menu screen in NeoForge (before, it quit
|
||||
to the main screen or current game).
|
||||
|
||||
# Version Forge-1.26.4
|
||||
|
||||
[Add support for "per-player-stats" in Turn-Based-Battle.](https://stephen-seo.github.io/TurnBasedMinecraftMod/server_config/#per-player-settings)
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
|
|||
private Checkbox affectedByMasterVolCheckbox = null;
|
||||
private Checkbox affectedByMusicVolCheckbox = null;
|
||||
private SliderPercentage volumeSlider = null;
|
||||
private Screen parentScreen = null;
|
||||
|
||||
public ClientConfigGui(ModContainer container, Screen parent) {
|
||||
super(Component.literal("TurnBasedMC Client Config"));
|
||||
|
@ -27,6 +28,8 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
|
|||
dirtyFlag = true;
|
||||
|
||||
accepted = false;
|
||||
|
||||
this.parentScreen = parent;
|
||||
}
|
||||
|
||||
public void onDirty() {
|
||||
|
@ -175,7 +178,7 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
|
|||
addRenderableWidget(volumeSlider);
|
||||
|
||||
addRenderableWidget(Button.builder(Component.literal("Cancel"),
|
||||
(b) -> Minecraft.getInstance().setScreen(null))
|
||||
(b) -> Minecraft.getInstance().setScreen(this.parentScreen))
|
||||
.bounds(this.width / 2 - widget_width + widget_x_offset,
|
||||
this.height - widget_height, widget_width, widget_height).build());
|
||||
addRenderableWidget(Button.builder(Component.literal("Accept"), (b) -> {
|
||||
|
@ -225,7 +228,7 @@ public class ClientConfigGui extends net.minecraft.client.gui.screens.Screen {
|
|||
public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
|
||||
if (accepted) {
|
||||
doAccepted();
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
Minecraft.getInstance().setScreen(this.parentScreen);
|
||||
return;
|
||||
}
|
||||
if (dirtyFlag) {
|
||||
|
|
Loading…
Reference in a new issue