hud: show player position (#717)
* hud: show player position * hud: clean up old statement * hug: address comments
This commit is contained in:
@@ -49,6 +49,7 @@ customgame = Custom Game
|
|||||||
newgame = New Game
|
newgame = New Game
|
||||||
none = <none>
|
none = <none>
|
||||||
minimap = Minimap
|
minimap = Minimap
|
||||||
|
position = Position
|
||||||
close = Close
|
close = Close
|
||||||
website = Website
|
website = Website
|
||||||
quit = Quit
|
quit = Quit
|
||||||
@@ -593,6 +594,7 @@ setting.fps.name = Show FPS
|
|||||||
setting.vsync.name = VSync
|
setting.vsync.name = VSync
|
||||||
setting.pixelate.name = Pixelate[lightgray] (disables animations)
|
setting.pixelate.name = Pixelate[lightgray] (disables animations)
|
||||||
setting.minimap.name = Show Minimap
|
setting.minimap.name = Show Minimap
|
||||||
|
setting.position.name = Show Player Position
|
||||||
setting.musicvol.name = Music Volume
|
setting.musicvol.name = Music Volume
|
||||||
setting.ambientvol.name = Ambient Volume
|
setting.ambientvol.name = Ambient Volume
|
||||||
setting.mutemusic.name = Mute Music
|
setting.mutemusic.name = Mute Music
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ customgame = 自定义游戏
|
|||||||
newgame = 新游戏
|
newgame = 新游戏
|
||||||
none = <无>
|
none = <无>
|
||||||
minimap = 小地图
|
minimap = 小地图
|
||||||
|
position = 位置
|
||||||
close = 关闭
|
close = 关闭
|
||||||
website = 官网
|
website = 官网
|
||||||
quit = 退出
|
quit = 退出
|
||||||
@@ -547,6 +548,7 @@ setting.fps.name = 显示 FPS
|
|||||||
setting.vsync.name = 垂直同步
|
setting.vsync.name = 垂直同步
|
||||||
setting.pixelate.name = 像素画面 [LIGHT_GRAY](禁用动画)
|
setting.pixelate.name = 像素画面 [LIGHT_GRAY](禁用动画)
|
||||||
setting.minimap.name = 显示小地图
|
setting.minimap.name = 显示小地图
|
||||||
|
setting.position.name = 显示玩家坐标
|
||||||
setting.musicvol.name = 音乐音量
|
setting.musicvol.name = 音乐音量
|
||||||
setting.ambientvol.name = 环境体积
|
setting.ambientvol.name = 环境体积
|
||||||
setting.mutemusic.name = 静音
|
setting.mutemusic.name = 静音
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
graphics.checkPref("effects", true);
|
graphics.checkPref("effects", true);
|
||||||
graphics.checkPref("playerchat", true);
|
graphics.checkPref("playerchat", true);
|
||||||
graphics.checkPref("minimap", !mobile);
|
graphics.checkPref("minimap", !mobile);
|
||||||
|
graphics.checkPref("position", false);
|
||||||
graphics.checkPref("fps", false);
|
graphics.checkPref("fps", false);
|
||||||
graphics.checkPref("indicators", true);
|
graphics.checkPref("indicators", true);
|
||||||
graphics.checkPref("animatedwater", false);
|
graphics.checkPref("animatedwater", false);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import io.anuke.arc.scene.ui.*;
|
|||||||
import io.anuke.arc.scene.ui.ImageButton.*;
|
import io.anuke.arc.scene.ui.ImageButton.*;
|
||||||
import io.anuke.arc.scene.ui.layout.*;
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
import io.anuke.arc.util.*;
|
import io.anuke.arc.util.*;
|
||||||
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.core.GameState.*;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
import io.anuke.mindustry.entities.*;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
@@ -250,8 +251,15 @@ public class HudFragment extends Fragment{
|
|||||||
}).top().left();
|
}).top().left();
|
||||||
});
|
});
|
||||||
|
|
||||||
//minimap
|
parent.fill(t -> {
|
||||||
parent.fill(t -> t.top().right().add(new Minimap()).visible(() -> Core.settings.getBool("minimap") && !state.rules.tutorial));
|
//minimap
|
||||||
|
t.add(new Minimap().visible(() -> Core.settings.getBool("minimap") && !state.rules.tutorial));
|
||||||
|
t.row();
|
||||||
|
//position
|
||||||
|
t.label(() -> (int)player.x + "," + (int)player.y).visible(
|
||||||
|
() -> Core.settings.getBool("position") && !state.rules.tutorial);
|
||||||
|
t.top().right();
|
||||||
|
});
|
||||||
|
|
||||||
//spawner warning
|
//spawner warning
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user