mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Support disabling combo boxes appropriately
This commit is contained in:
@@ -87,6 +87,14 @@ public class FDeckImportDialog extends FDialog {
|
|||||||
for (DeckRecognizer.Token token : tokens) {
|
for (DeckRecognizer.Token token : tokens) {
|
||||||
if (token.getType() == TokenType.KnownCard) {
|
if (token.getType() == TokenType.KnownCard) {
|
||||||
showOptions = true;
|
showOptions = true;
|
||||||
|
|
||||||
|
dateTimeCheck.setCommand(new FEventHandler() {
|
||||||
|
@Override
|
||||||
|
public void handleEvent(FEvent e) {
|
||||||
|
updateDropDownEnabled();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateDropDownEnabled();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,6 +104,12 @@ public class FDeckImportDialog extends FDialog {
|
|||||||
txtInput.setText("No known cards found on clipboard.\n\nCopy the decklist to the clipboard, then reopen this dialog.");
|
txtInput.setText("No known cards found on clipboard.\n\nCopy the decklist to the clipboard, then reopen this dialog.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateDropDownEnabled() {
|
||||||
|
boolean enabled = dateTimeCheck.isSelected();
|
||||||
|
monthDropdown.setEnabled(enabled);
|
||||||
|
yearDropdown.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawOverlay(Graphics g) {
|
public void drawOverlay(Graphics g) {
|
||||||
super.drawOverlay(g);
|
super.drawOverlay(g);
|
||||||
|
|||||||
Reference in New Issue
Block a user