Skip to content

Commit

Permalink
fix radial menu spamming keys
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Apr 26, 2024
1 parent 26afbaf commit d9687fa
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit d9687fa

Please sign in to comment.