cleanup tabstuff in optionsoverlay
This commit is contained in:
parent
6660f127f9
commit
7096201521
|
@ -409,18 +409,16 @@ public class OptionsOverlay {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if tab was clicked
|
||||||
int tScrollOffset = 0;
|
int tScrollOffset = 0;
|
||||||
for (int tabIndex = 0; tabIndex < tabs.length; tabIndex++) {
|
for (OptionTab tab : tabs) {
|
||||||
if (tabs[tabIndex].button.contains(x, y)) {
|
if (tab.button.contains(x, y)) {
|
||||||
if (selectedTab != tabIndex) {
|
|
||||||
selectedTab = tabIndex;
|
|
||||||
scrollOffset = tScrollOffset;
|
scrollOffset = tScrollOffset;
|
||||||
SoundController.playSound(SoundEffect.MENUCLICK);
|
SoundController.playSound(SoundEffect.MENUCLICK);
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tScrollOffset += Fonts.MEDIUM.getLineHeight() * 2;
|
tScrollOffset += Fonts.MEDIUM.getLineHeight() * 2;
|
||||||
tScrollOffset += tabs[tabIndex].options.length * optionHeight;
|
tScrollOffset += tab.options.length * optionHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user