fix back button

Make it immune to the "do not hover if options visible" hack.
Make the states render it, not the options menu.
This commit is contained in:
yugecin
2018-07-08 10:58:00 +02:00
parent 70902e42cb
commit ab6aa75f8b
7 changed files with 17 additions and 9 deletions

View File

@@ -172,11 +172,11 @@ public class BackButton {
/**
* Processes a hover action depending on whether or not the cursor
* is hovering over the button.
* @param delta the delta interval
* @param cx the x coordinate
* @param cy the y coordinate
*/
public void hoverUpdate(int delta, int cx, int cy) {
public void hoverUpdate() {
final int delta = renderDelta;
final int cx = mouseX;
final int cy = mouseY;
if (backButton != null) {
backButton.hoverUpdate(delta, cx, cy);
return;

View File

@@ -702,7 +702,6 @@ public class OptionsOverlay implements ResolutionChangedListener {
prevMouseY = mouseY;
updateHoverOption(mouseX, mouseY);
updateIndicatorAlpha();
backButton.hoverUpdate(delta, mouseX, mouseY);
if (isAdjustingSlider) {
int sliderValue = ((NumericOption) hoverOption).val;
updateSliderOption();