Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -84,6 +84,7 @@ amrsoll
|
||||
ねらひかだ
|
||||
Draco
|
||||
Quezler
|
||||
killall -q
|
||||
Alicila
|
||||
Daniel Dusek
|
||||
DeltaNedas
|
||||
|
||||
@@ -413,6 +413,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
||||
if(showing()) return;
|
||||
|
||||
if(selected == hovered && count == 2){
|
||||
playSelected();
|
||||
}
|
||||
|
||||
if(hovered != null && (canSelect(hovered) || debugSelect)){
|
||||
selected = hovered;
|
||||
}
|
||||
@@ -762,7 +766,36 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
sector.isBeingPlayed() ? "@sectors.resume" :
|
||||
sector.hasBase() ? "@sectors.go" :
|
||||
locked ? "@locked" : "@sectors.launch",
|
||||
locked ? Icon.lock :Icon.play, () -> {
|
||||
locked ? Icon.lock : Icon.play, () -> {
|
||||
playSelected();
|
||||
}).growX().height(54f).minWidth(170f).padTop(4).disabled(locked);
|
||||
}
|
||||
|
||||
stable.pack();
|
||||
stable.setPosition(x, y, Align.center);
|
||||
|
||||
stable.update(() -> {
|
||||
if(selected != null){
|
||||
if(launching){
|
||||
stable.color.sub(0, 0, 0, 0.05f * Time.delta);
|
||||
}else{
|
||||
//fade out UI when not facing selected sector
|
||||
Tmp.v31.set(selected.tile.v).rotate(Vec3.Y, -planets.planet.getRotation()).scl(-1f).nor();
|
||||
float dot = planets.cam.direction.dot(Tmp.v31);
|
||||
stable.color.a = Math.max(dot, 0f)*2f;
|
||||
if(dot*2f <= -0.1f){
|
||||
selected = null;
|
||||
updateSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
stable.act(0f);
|
||||
}
|
||||
|
||||
void playSelected(){
|
||||
Sector sector = selected;
|
||||
|
||||
if(sector.isBeingPlayed()){
|
||||
//already at this sector
|
||||
@@ -815,30 +848,6 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
|
||||
if(shouldHide) hide();
|
||||
}).growX().height(54f).minWidth(170f).padTop(4).disabled(locked);
|
||||
}
|
||||
|
||||
stable.pack();
|
||||
stable.setPosition(x, y, Align.center);
|
||||
|
||||
stable.update(() -> {
|
||||
if(selected != null){
|
||||
if(launching){
|
||||
stable.color.sub(0, 0, 0, 0.05f * Time.delta);
|
||||
}else{
|
||||
//fade out UI when not facing selected sector
|
||||
Tmp.v31.set(selected.tile.v).rotate(Vec3.Y, -planets.planet.getRotation()).scl(-1f).nor();
|
||||
float dot = planets.cam.direction.dot(Tmp.v31);
|
||||
stable.color.a = Math.max(dot, 0f)*2f;
|
||||
if(dot*2f <= -0.1f){
|
||||
selected = null;
|
||||
updateSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
stable.act(0f);
|
||||
}
|
||||
|
||||
public enum Mode{
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
"name": "Ranked",
|
||||
"address": ["mindustryranked.ddns.net:16567"]
|
||||
},
|
||||
{
|
||||
"name": "TWS",
|
||||
"address": ["twsmindustry.24x7.hk:6701", "twsmindustry.24x7.hk:6702"]
|
||||
},
|
||||
{
|
||||
"address": "cheginde.ddns.net"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user