From d9687fa9192df712fc6182c493b1ee1595f26b51 Mon Sep 17 00:00:00 2001 From: fayer3 Date: Fri, 26 Apr 2024 16:39:34 +0200 Subject: [PATCH] fix radial menu spamming keys --- .../gui/settings/GuiRadialConfiguration.java | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/common/src/main/java/org/vivecraft/client/gui/settings/GuiRadialConfiguration.java b/common/src/main/java/org/vivecraft/client/gui/settings/GuiRadialConfiguration.java index 6d1a90c13..552cd316e 100644 --- a/common/src/main/java/org/vivecraft/client/gui/settings/GuiRadialConfiguration.java +++ b/common/src/main/java/org/vivecraft/client/gui/settings/GuiRadialConfiguration.java @@ -145,23 +145,21 @@ public void init() { .size(buttonWidth, 20) .pos(centerX + x - buttonWidth / 2, centerY + y) .build()); - - - this.addRenderableWidget( - new GuiVROptionButton(VRSettings.VrOptions.RADIAL_NUMBER.ordinal(), - centerX - 10, centerY, 20, 20, - VRSettings.VrOptions.RADIAL_NUMBER, "" + this.dataholder.vrSettings.vrRadialButtons, - (p) -> { - this.dataholder.vrSettings.vrRadialButtons += 2; - if (dataholder.vrSettings.vrRadialButtons > - VRSettings.VrOptions.RADIAL_NUMBER.getValueMax()) - { - this.dataholder.vrSettings.vrRadialButtons = (int) VRSettings.VrOptions.RADIAL_NUMBER.getValueMin(); - } - this.reinit = true; - })); - super.addDefaultButtons(); } + + this.addRenderableWidget( + new GuiVROptionButton(VRSettings.VrOptions.RADIAL_NUMBER.ordinal(), + centerX - 10, centerY, 20, 20, + VRSettings.VrOptions.RADIAL_NUMBER, "" + this.dataholder.vrSettings.vrRadialButtons, + (p) -> { + this.dataholder.vrSettings.vrRadialButtons += 2; + if (dataholder.vrSettings.vrRadialButtons > + VRSettings.VrOptions.RADIAL_NUMBER.getValueMax()) { + this.dataholder.vrSettings.vrRadialButtons = (int) VRSettings.VrOptions.RADIAL_NUMBER.getValueMin(); + } + this.reinit = true; + })); + super.addDefaultButtons(); } }