mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 12:23:47 +07:00
Hide command mode popup on mobile
This commit is contained in:
parent
650b67365b
commit
d4b0c9da1b
@ -399,13 +399,16 @@ public class PlacementFragment{
|
|||||||
mainStack.update(() -> {
|
mainStack.update(() -> {
|
||||||
if(control.input.commandMode != wasCommandMode){
|
if(control.input.commandMode != wasCommandMode){
|
||||||
mainStack.clearChildren();
|
mainStack.clearChildren();
|
||||||
mainStack.addChild(control.input.commandMode ? commandTable : blockCatTable);
|
if(!mobile || !control.input.commandMode){
|
||||||
wasCommandMode = control.input.commandMode;
|
mainStack.addChild(control.input.commandMode ? commandTable : blockCatTable);
|
||||||
|
|
||||||
//hacky, but forces command table to be same width as blocks
|
//hacky, but forces command table to be same width as blocks
|
||||||
if(wasCommandMode){
|
if(control.input.commandMode){
|
||||||
commandTable.getCells().peek().width(blockCatTable.getWidth());
|
commandTable.getCells().peek().width(blockCatTable.getWidth());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wasCommandMode = control.input.commandMode;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user