Shooting -> Function category / Dialog cleanup

This commit is contained in:
Anuken
2020-10-23 10:39:01 -04:00
parent d66cf13ac6
commit bf1268bb6e
16 changed files with 44 additions and 66 deletions

View File

@@ -53,15 +53,19 @@ public class BaseDialog extends Dialog{
});
}
@Override
public void addCloseButton(){
buttons.defaults().size(210f, 64f);
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
public void addCloseListener(){
keyDown(key -> {
if(key == KeyCode.escape || key == KeyCode.back){
Core.app.post(this::hide);
}
});
}
@Override
public void addCloseButton(){
buttons.defaults().size(210f, 64f);
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
addCloseListener();
}
}