Skip to content

Commit

Permalink
fixup! ARC merged
Browse files Browse the repository at this point in the history
* 波次信息面板自动失焦
* 面板挤长ui
  • Loading branch information
MinRi2 committed Apr 20, 2024
1 parent 50c4590 commit 52b9657
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/mindustry/arcModule/ui/auxilliary/WaveInfoTable.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package mindustry.arcModule.ui.auxilliary;

import arc.*;
import arc.scene.*;
import arc.scene.ui.*;
import arc.scene.ui.layout.*;
import arc.util.*;
Expand Down Expand Up @@ -91,7 +92,15 @@ protected void setup(){
});
});

pane(Styles.noBarPane, waveInfo).scrollY(false).pad(8f).maxWidth(300f).left();
pane(Styles.noBarPane, waveInfo).scrollY(false).pad(8f).maxWidth(180f).left().update(pane -> {
// 自动失焦
if(pane.hasScroll()){
Element result = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true);
if(result == null || !result.isDescendantOf(pane)){
Core.scene.setScrollFocus(null);
}
}
});
}

private void rebuildWaveInfo(){
Expand Down

0 comments on commit 52b9657

Please sign in to comment.