This commit is contained in:
Anuken
2020-08-26 14:35:43 -04:00
parent 1c12740006
commit 8a36b3e590
3 changed files with 7 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ public class ChatFragment extends Table{
update(() -> { update(() -> {
if(net.active() && input.keyTap(Binding.chat) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null || ui.minimapfrag.shown())){ if(net.active() && input.keyTap(Binding.chat) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null || ui.minimapfrag.shown()) && !ui.scriptfrag.shown()){
toggle(); toggle();
} }

View File

@@ -44,7 +44,7 @@ public class ScriptConsoleFragment extends Table{
font = Fonts.def; font = Fonts.def;
visible(() -> { visible(() -> {
if(input.keyTap(Binding.console) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null)){ if(input.keyTap(Binding.console) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null) && !ui.chatfrag.shown()){
shown = !shown; shown = !shown;
if(shown && !open && enableConsole){ if(shown && !open && enableConsole){
toggle(); toggle();
@@ -218,6 +218,10 @@ public class ScriptConsoleFragment extends Table{
return open; return open;
} }
public boolean shown(){
return shown;
}
public void addMessage(String message){ public void addMessage(String message){
messages.insert(0, message); messages.insert(0, message);
} }

View File

@@ -72,7 +72,7 @@ public class Tiles implements Iterable<Tile>{
return get(Point2.x(pos), Point2.y(pos)); return get(Point2.x(pos), Point2.y(pos));
} }
public void each(Cons<Tile> cons){ public void eachTile(Cons<Tile> cons){
for(Tile tile : array){ for(Tile tile : array){
cons.get(tile); cons.get(tile);
} }