checkboxes, sliders

This commit is contained in:
yugecin
2016-12-11 02:08:35 +01:00
parent edd781b0d4
commit 988975c612
7 changed files with 78 additions and 14 deletions

View File

@@ -237,6 +237,9 @@ public enum GameImage {
REPLAY_PLAYBACK_HALF ("playback-half", "png", false, false),
// Non-Game Components
CONTROL_SLIDER_BALL ("control-sliderball", "png", false, false),
CONTROL_CHECK_ON ("control-check-on", "png", false, false),
CONTROL_CHECK_OFF ("control-check-off", "png", false, false),
VOLUME ("volume-bg", "png", false, false) {
@Override
protected Image process_sub(Image img, int w, int h) {

View File

@@ -1305,7 +1305,7 @@ public class Options {
private int max, min;
/** Option types. */
private enum OptionType { BOOLEAN, NUMERIC, OTHER };
public enum OptionType { BOOLEAN, NUMERIC, OTHER };
/** Whether or not this is a numeric option. */
private OptionType type = OptionType.OTHER;
@@ -1494,8 +1494,8 @@ public class Options {
bool = Boolean.parseBoolean(s);
}
public boolean isDragOption() {
return type == OptionType.NUMERIC;
public OptionType getType() {
return type;
}
public int getMinValue() {

View File

@@ -173,7 +173,7 @@ public class OptionsMenu extends BasicGameState implements OptionsOverlay.Parent
int width = container.getWidth();
int height = container.getHeight();
optionsOverlay = new OptionsOverlay(this, options, 5, width, height);
optionsOverlay = new OptionsOverlay(this, options, 5, container);
}
@Override