Better inset borders for phones
This commit is contained in:
BIN
core/assets-raw/sprites/ui/pane-left.9.png
Normal file
BIN
core/assets-raw/sprites/ui/pane-left.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 B |
BIN
core/assets-raw/sprites/ui/pane-right.9.png
Normal file
BIN
core/assets-raw/sprites/ui/pane-right.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 191 B |
@@ -279,7 +279,14 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
t.bottom().left();
|
t.bottom().left();
|
||||||
t.button("@command", Icon.units, Styles.squareTogglet, () -> {
|
t.button("@command", Icon.units, Styles.squareTogglet, () -> {
|
||||||
commandMode = !commandMode;
|
commandMode = !commandMode;
|
||||||
}).width(155f).height(50f).margin(12f).checked(b -> commandMode);
|
}).width(155f).height(50f).margin(12f).checked(b -> commandMode).row();
|
||||||
|
|
||||||
|
//for better looking insets
|
||||||
|
t.rect((x, y, w, h) -> {
|
||||||
|
if(Core.scene.marginBottom > 0){
|
||||||
|
Tex.paneRight.draw(x, 0, w, y);
|
||||||
|
}
|
||||||
|
}).fillX().row();
|
||||||
});
|
});
|
||||||
|
|
||||||
group.fill(t -> {
|
group.fill(t -> {
|
||||||
|
|||||||
@@ -129,6 +129,13 @@ public class HudFragment{
|
|||||||
cont.top().left();
|
cont.top().left();
|
||||||
|
|
||||||
if(mobile){
|
if(mobile){
|
||||||
|
//for better inset visuals
|
||||||
|
cont.rect((x, y, w, h) -> {
|
||||||
|
if(Core.scene.marginTop > 0){
|
||||||
|
Tex.paneRight.draw(x, y, w, Core.scene.marginTop);
|
||||||
|
}
|
||||||
|
}).fillX().row();
|
||||||
|
|
||||||
cont.table(select -> {
|
cont.table(select -> {
|
||||||
select.name = "mobile buttons";
|
select.name = "mobile buttons";
|
||||||
select.left();
|
select.left();
|
||||||
|
|||||||
@@ -421,6 +421,15 @@ public class PlacementFragment{
|
|||||||
|
|
||||||
frame.add(mainStack).colspan(3).fill();
|
frame.add(mainStack).colspan(3).fill();
|
||||||
|
|
||||||
|
frame.row();
|
||||||
|
|
||||||
|
//for better inset visuals at the bottom
|
||||||
|
frame.rect((x, y, w, h) -> {
|
||||||
|
if(Core.scene.marginBottom > 0){
|
||||||
|
Tex.paneLeft.draw(x, 0, w, y);
|
||||||
|
}
|
||||||
|
}).colspan(3).fillX().row();
|
||||||
|
|
||||||
//commandTable: commanded units
|
//commandTable: commanded units
|
||||||
{
|
{
|
||||||
commandTable.touchable = Touchable.enabled;
|
commandTable.touchable = Touchable.enabled;
|
||||||
|
|||||||
Reference in New Issue
Block a user