Skip to content

Commit

Permalink
[Fix] Crashed in mindustryX
Browse files Browse the repository at this point in the history
  • Loading branch information
MinRi2 committed Jul 7, 2024
1 parent 61f5846 commit 5949f32
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/MinerTools/ui/override/CoreItemsDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void addSettings(MSettingTable setting){
}

private void setup(){
override = ui.hudGroup.find(c -> c instanceof mindustry.ui.CoreItemsDisplay);
override = Reflect.get(ui.hudfrag, "coreItems");
override.parent.touchable = Touchable.disabled;

// Setup ui
Expand Down
4 changes: 2 additions & 2 deletions src/MinerTools/ui/tables/MembersTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void setMember(MemberTable member){
showMember = member;
if(member != null){
container.add(member).grow().padRight(2.0f);
member.memberRebuild();
member.onSelected();
}
}

Expand Down Expand Up @@ -108,7 +108,7 @@ public boolean canShown(){
return !(this.mobileOnly && !Vars.mobile || this.desktopOnly && !MinerVars.desktop);
}

public void memberRebuild(){
public void onSelected(){
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/MinerTools/ui/tables/members/AITable.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public AITable(){
}

@Override
public void memberRebuild(){
public void onSelected(){
clear();

table(Styles.black6, buttons -> {
Expand Down
2 changes: 1 addition & 1 deletion src/MinerTools/ui/tables/members/TeamChanger.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public TeamChanger(){
}

@Override
public void memberRebuild(){
public void onSelected(){
clear();

table(black3, skipTable -> {
Expand Down
3 changes: 2 additions & 1 deletion src/MinerTools/ui/tables/members/TeamsInfo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package MinerTools.ui.tables.members;

import MinRi2.ModCore.ui.*;
import MinRi2.ModCore.ui.element.*;
import MinerTools.game.*;
import MinerTools.ui.*;
import MinerTools.ui.tables.MembersTable.*;
Expand Down Expand Up @@ -31,7 +32,7 @@ public TeamsInfo(){
}

@Override
public void memberRebuild(){
public void onSelected(){
setup();
}

Expand Down

0 comments on commit 5949f32

Please sign in to comment.