Added Quests and Real Settings (yay)
This commit is contained in:
@@ -73,15 +73,15 @@ public class SettingsControls {
|
||||
return button;
|
||||
}
|
||||
|
||||
public static FlowLayout makeCyclingButton(Surface baseSurface, List<ButtonState> states) {
|
||||
int[] currentIndex = {0};
|
||||
public static FlowLayout makeCyclingButton(Surface baseSurface, List<ButtonState> states, int initialIndex) {
|
||||
int[] currentIndex = { initialIndex };
|
||||
|
||||
FlowLayout button = UIContainers.verticalFlow(Sizing.fixed(50), Sizing.fixed(16));
|
||||
button.verticalAlignment(VerticalAlignment.CENTER);
|
||||
button.horizontalAlignment(HorizontalAlignment.CENTER);
|
||||
button.surface(baseSurface);
|
||||
|
||||
var label = UIComponents.label(Component.literal(states.get(0).label()))
|
||||
var label = UIComponents.label(Component.literal(states.get(initialIndex).label()))
|
||||
.color(Color.ofRgb(0xFFFFFF));
|
||||
button.child(label);
|
||||
|
||||
@@ -104,6 +104,11 @@ public class SettingsControls {
|
||||
return button;
|
||||
}
|
||||
|
||||
// keep the old call sites compiling; defaults to index 0
|
||||
public static FlowLayout makeCyclingButton(Surface baseSurface, List<ButtonState> states) {
|
||||
return makeCyclingButton(baseSurface, states, 0);
|
||||
}
|
||||
|
||||
public static FlowLayout makeSlider(Surface baseSurface, int width, double min, double max, double initial,
|
||||
DoubleFunction<String> labelFormatter, DoubleConsumer onChange) {
|
||||
int labelWidth = 34;
|
||||
|
||||
Reference in New Issue
Block a user