File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,20 +32,19 @@ public static Cell<Table> teamChanger(Table t){
3232 BLElements .boxTooltip (teams , "@tu-tooltip.button-team" );
3333 int i = 0 ;
3434 for (Team team : Team .baseTeams ){
35- HoldImageButton button = new HoldImageButton (Tex .whiteui , TUStyles .clearNoneTogglehi );
35+ HoldImageButton button = new HoldImageButton (Tex .whiteui , TUStyles .teamChanger );
3636 button .clicked (() -> changeTeam (team ));
3737 button .held (() -> teamDialog .show (curTeam (), TeamChanger ::changeTeam ));
3838
39- button .getImageCell ().scaling (Scaling .stretch ).grow ();
40- button .getStyle ().imageUpColor = team .color ;
39+ button .getImageCell ().scaling (Scaling .stretch ).grow ().color (team .color );
4140 button .update (() -> button .setChecked (player .team () == team ));
4241
43- teams .add (button ).grow ().margin (6f ). center ( );
42+ teams .add (button ).grow ().center (). margin (4f ). color ( Tmp . c1 . set ( team . color ). mul ( 0.7f ) );
4443 if (++i % 3 == 0 ){
4544 teams .row ();
4645 }
4746 }
48- });
47+ }). grow () ;
4948 }
5049
5150 public static Team curTeam (){
@@ -63,9 +62,4 @@ public static Team getNextTeam(){
6362 public static void addButton (Table t ){
6463 teamChanger (t ).width (100 );
6564 }
66-
67- static String teamName (){
68- String t = teamDialog .teamName (curTeam ());
69- return "[#" + curTeam ().color .toString () + "]" + t .substring (0 , 1 ).toUpperCase () + t .substring (1 );
70- }
7165}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public class TUStyles{
2828
2929 public static HoldImageButtonStyle
3030 tuHoldImageStyle ,
31- clearNoneTogglehi ;
31+ teamChanger ;
3232
3333 public static void init (){
3434 buttonLeft = atlas .getDrawable ("test-utils-button-left" );
@@ -100,6 +100,9 @@ public static void init(){
100100
101101 tuHoldImageStyle = new HoldImageButtonStyle (tuImageStyle );
102102
103- clearNoneTogglehi = new HoldImageButtonStyle (Styles .clearNoneTogglei );
103+ teamChanger = new HoldImageButtonStyle (Styles .clearNoneTogglei ){{
104+ down = Tex .whiteui ;
105+ checked = Tex .whiteui ;
106+ }};
104107 }
105108}
You can’t perform that action at this time.
0 commit comments