Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,7 +7,7 @@ import arc.util.*;
|
||||
public class HoverPart extends DrawPart{
|
||||
public float radius = 4f;
|
||||
public float x, y, rotation, phase = 50f, stroke = 3f, minStroke = 0.12f;
|
||||
public int circles = 2;
|
||||
public int circles = 2, sides = 4;
|
||||
public Color color = Color.white;
|
||||
public boolean mirror = false;
|
||||
public float layer = -1f, layerOffset = 0f;
|
||||
@@ -40,7 +40,7 @@ public class HoverPart extends DrawPart{
|
||||
rx = params.x + Tmp.v1.x,
|
||||
ry = params.y + Tmp.v1.y;
|
||||
|
||||
Lines.square(rx, ry, radius * fin, params.rotation - 45f);
|
||||
Lines.poly(rx, ry, sides, radius * fin, params.rotation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -196,33 +196,36 @@ public class PlayerListFragment{
|
||||
}).row();
|
||||
}
|
||||
|
||||
t.button("@player.team", Icon.redo, bstyle, () -> {
|
||||
var teamSelect = new BaseDialog(Core.bundle.get("player.team") + ": " + user.name);
|
||||
teamSelect.setFillParent(false);
|
||||
//there's generally no reason to team switch outside PvP or sandbox, and it's basically an easy way to cheat
|
||||
if(state.rules.pvp || state.rules.infiniteResources){
|
||||
t.button("@player.team", Icon.redo, bstyle, () -> {
|
||||
var teamSelect = new BaseDialog(Core.bundle.get("player.team") + ": " + user.name);
|
||||
teamSelect.setFillParent(false);
|
||||
|
||||
var group = new ButtonGroup<>();
|
||||
var group = new ButtonGroup<>();
|
||||
|
||||
int i = 0;
|
||||
int i = 0;
|
||||
|
||||
for(Team team : Team.baseTeams){
|
||||
var b = new ImageButton(Tex.whiteui, Styles.clearNoneTogglei);
|
||||
b.margin(4f);
|
||||
b.getImageCell().grow();
|
||||
b.getStyle().imageUpColor = team.color;
|
||||
b.clicked(() -> {
|
||||
Call.adminRequest(user, AdminAction.switchTeam, team);
|
||||
teamSelect.hide();
|
||||
});
|
||||
teamSelect.cont.add(b).size(50f).checked(a -> user.team() == team).group(group);
|
||||
for(Team team : Team.baseTeams){
|
||||
var b = new ImageButton(Tex.whiteui, Styles.clearNoneTogglei);
|
||||
b.margin(4f);
|
||||
b.getImageCell().grow();
|
||||
b.getStyle().imageUpColor = team.color;
|
||||
b.clicked(() -> {
|
||||
Call.adminRequest(user, AdminAction.switchTeam, team);
|
||||
teamSelect.hide();
|
||||
});
|
||||
teamSelect.cont.add(b).size(50f).checked(a -> user.team() == team).group(group);
|
||||
|
||||
if(i++ % 3 == 2) teamSelect.cont.row();
|
||||
}
|
||||
if(i++ % 3 == 2) teamSelect.cont.row();
|
||||
}
|
||||
|
||||
teamSelect.addCloseButton();
|
||||
teamSelect.show();
|
||||
teamSelect.addCloseButton();
|
||||
teamSelect.show();
|
||||
|
||||
dialog.hide();
|
||||
}).row();
|
||||
dialog.hide();
|
||||
}).row();
|
||||
}
|
||||
|
||||
if(!net.client() && !user.isLocal()){
|
||||
t.button("@player.admin", Icon.admin, Styles.togglet, () -> {
|
||||
|
||||
Reference in New Issue
Block a user