Sharlotte
2021-07-20 14:36:50 +09:00
parent 873c555c2e
commit f7b2d6caa2

View File

@@ -8,6 +8,7 @@ import arc.scene.ui.layout.*;
import arc.struct.Seq; import arc.struct.Seq;
import arc.util.*; import arc.util.*;
import mindustry.*; import mindustry.*;
import mindustry.core.Version;
import mindustry.game.Team; import mindustry.game.Team;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.ui.Styles; import mindustry.ui.Styles;
@@ -40,7 +41,7 @@ public class Setting {
public void add(SettingsMenuDialog.SettingsTable table){ public void add(SettingsMenuDialog.SettingsTable table){
Slider slider = new Slider(min, max, step, false); Slider slider = new Slider(min, max, step, false);
slider.addListener(new Tooltip(t -> t.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]")))); if(Version.build <= 128) slider.addListener(new Tooltip(t -> t.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]"))));
slider.setValue(settings.getInt(name)); slider.setValue(settings.getInt(name));
Label value = new Label(""); Label value = new Label("");
@@ -74,7 +75,7 @@ public class Setting {
@Override @Override
public void add(SettingsMenuDialog.SettingsTable table) { public void add(SettingsMenuDialog.SettingsTable table) {
CheckBox box = new CheckBox(title); CheckBox box = new CheckBox(title);
box.addListener(new Tooltip(t -> t.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]")))); if(Version.build <= 128) box.addListener(new Tooltip(t -> t.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]"))));
box.update(() -> box.setChecked(settings.getBool(name))); box.update(() -> box.setChecked(settings.getBool(name)));
@@ -213,7 +214,7 @@ public class Setting {
t.left().defaults().left(); t.left().defaults().left();
t.add(label).minWidth(label.getPrefWidth() / Scl.scl(1.0F) + 50.0F); t.add(label).minWidth(label.getPrefWidth() / Scl.scl(1.0F) + 50.0F);
t.add(button).size(40F); t.add(button).size(40F);
t.addListener(new Tooltip(tt -> tt.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]")))); if(Version.build <= 128) t.addListener(new Tooltip(tt -> tt.background(Tex.button).table(to -> to.add("[lightgray]" + Core.bundle.get("setting." + key + ".description") + "[]"))));
}).left().padTop(3.0F); }).left().padTop(3.0F);
settingsTable.row(); settingsTable.row();
} }