fixed item tap

This commit is contained in:
sharlotte
2021-08-26 09:55:08 +09:00
parent 09e5c4bc9e
commit 0c76cd3ec8
4 changed files with 19 additions and 25 deletions

View File

@@ -38,18 +38,6 @@ public class BarInfo {
static Seq<String> strings = Seq.with("","","","","","");
static FloatSeq numbers = FloatSeq.with(0f,0f,0f,0f,0f,0f);
static Seq<Color> colors = Seq.with(Color.clear,Color.clear,Color.clear,Color.clear,Color.clear,Color.clear);
static Field linkedCore; // Versions below 130 don't have this public
static {
if(Version.build <= 129) {
try {
linkedCore = StorageBlock.StorageBuild.class.getDeclaredField("linkedCore");
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
linkedCore.setAccessible(true);
}
}
public static <T extends Teamc> void getInfo(T target) throws IllegalAccessException, NoSuchFieldException {
for(int i = 0; i < 6; i++) { //init

View File

@@ -1072,16 +1072,17 @@ public class HudUi {
}
public void setItem(Table table){
table.left().defaults().minWidth(Scl.scl(modUiScale) * 54 * 8f).align(Align.center);
table.table().update(t -> {
t.clear();
for(int i = 0; i < coreItems.tables.size; i++){
if((state.rules.pvp && coreItems.teams[i] != player.team()) || coreItems.teams[i].cores().isEmpty()) continue;
int finalI = i;
Label label = new Label(() -> "[#" + coreItems.teams[finalI].color.toString() + "]" + coreItems.teams[finalI].name + "[]");
label.setFontScale(modUiScale);
t.background(Tex.underline2).add(label).center();
t.row();
t.add(coreItems.tables.get(i)).left();
t.table(tt -> {
tt.center().defaults().minWidth(Scl.scl(modUiScale) * 54 * 8f);
coreItems.tables.get(finalI).setBackground(((NinePatchDrawable)Tex.underline2).tint(coreItems.teams[finalI].color));
tt.add(coreItems.tables.get(finalI)).left();
}).pad(4);
t.row();
}
});
@@ -1107,7 +1108,7 @@ public class HudUi {
});
itemTable = new Table(table -> {
table.left().defaults().width(Scl.scl(modUiScale) * 54 * 8f).height(Scl.scl(modUiScale) * 32 * 8f).align(Align.left);
table.left().defaults().minWidth(Scl.scl(modUiScale) * 54 * 8f).height(Scl.scl(modUiScale) * 32 * 8f).align(Align.left);
table.table(Tex.button, t -> {
t.add(itemPane);
t.update(() -> {

View File

@@ -106,7 +106,7 @@ public class SettingS {
Seq<Seq<SharSetting>> settingSeq = new Seq<>();
Seq<SharSetting> tapSeq = new Seq<>();
addGraphicSlideSetting("barstyle", 0, 0, 5, 1, s -> s == 0 ? "default bar" : s + "th bar", tapSeq);
addGraphicSlideSetting("infoUiScale", 100, 50, 100, 5, s -> s + "%", tapSeq);
addGraphicSlideSetting("infoUiScale", 75, 50, 100, 5, s -> s + "%", tapSeq);
addGraphicSlideSetting("coreItemCheckRate", 60, 6, 180, 6, s -> Strings.fixed(s/60f,1) + "sec", tapSeq);
addGraphicTypeSetting("wavemax", 0, 100,200, true, () -> true, s -> s + "waves", tapSeq);
addGraphicCheckSetting("infoui", true, tapSeq);