Added new improvements

This commit is contained in:
Robert Vokac 2024-03-02 12:03:19 +00:00
parent d1f49803c8
commit 74f5fffb28
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
5 changed files with 35 additions and 0 deletions

View File

@ -137,6 +137,8 @@ Smileys can be colored or white-black (can be set in configuration)
* P or F1 - open help window
* X - exit application
* J - show random Joke
* U - enable everything
* I - disable almost everything
## Command button

View File

@ -61,6 +61,7 @@ public class TimeCalcKeyAdapter extends KeyAdapter {
} else {
timeCalcApp.visibilityProperty
.setValue(Visibility.GRAY.name());
MainWindow.hideShowCheckBox.setSelected(false);
}
}
if (e.getKeyCode() == KeyEvent.VK_C) {
@ -141,6 +142,14 @@ public class TimeCalcKeyAdapter extends KeyAdapter {
if (e.getKeyCode() == KeyEvent.VK_P || e.getKeyCode() == KeyEvent.VK_F1) {
window.openHelpWindow();
}
if (e.getKeyCode() == KeyEvent.VK_U) {
window.doEnableEverything();
}
if (e.getKeyCode() == KeyEvent.VK_I) {
window.doDisableAlmostEverything();
}
window.repaint();
}

View File

@ -219,6 +219,7 @@ public class ConfigWindow extends TWindow {
squareVisibleProperty.setSelected(enable);
circleVisibleProperty.setSelected(enable);
walkingHumanVisibleProperty.setSelected(enable);
MainWindow.hideShowCheckBox.setSelected(enable);
});
}
@ -455,4 +456,12 @@ public class ConfigWindow extends TWindow {
private void nextRow() {
currentY = (int) (currentY + 3.0d * SwingUtils.MARGIN);
}
public void doEnableEverything() {
this.enableAsMuchAsPossible.doClick();
}
public void doDisableAlmostEverything() {
this.disableAsMuchAsPossible.doClick();
}
}

View File

@ -590,4 +590,17 @@ public class MainWindow extends TWindow {
public void openHelpWindow() {
helpButton.doClick();
}
public void doEnableEverything() {
if(this.configWindow == null) {
openConfigWindow();
this.configWindow.setVisible(false);
}
this.configWindow.doEnableEverything();
}
public void doDisableAlmostEverything() {
this.configWindow.doDisableAlmostEverything();
}
}

View File

@ -137,6 +137,8 @@ Smileys can be colored or white-black (can be set in configuration)
* P or F1 - open help window
* X - exit application
* J - show random Joke
* U - enable everything
* I - disable almost everything
## Command button