forked from External/mage
* GUI: added card popup info in choose dialog (example: choose dungeon, #8012);
* GUI: added texts popup info in choose dialog (example: choose from any list);
This commit is contained in:
parent
b73f10a0ab
commit
d587cc9151
12 changed files with 322 additions and 36 deletions
|
|
@ -21,6 +21,7 @@ public class ChoiceImpl implements Choice {
|
|||
protected String subMessage;
|
||||
protected boolean searchEnabled = true; // enable for all windows by default
|
||||
protected String searchText;
|
||||
protected ChoiceHintType hintType;
|
||||
|
||||
// special button with #-answer
|
||||
// warning, only for human's GUI, not AI
|
||||
|
|
@ -34,7 +35,12 @@ public class ChoiceImpl implements Choice {
|
|||
}
|
||||
|
||||
public ChoiceImpl(boolean required) {
|
||||
this(required, ChoiceHintType.TEXT);
|
||||
}
|
||||
|
||||
public ChoiceImpl(boolean required, ChoiceHintType hintType) {
|
||||
this.required = required;
|
||||
this.hintType = hintType;
|
||||
}
|
||||
|
||||
public ChoiceImpl(final ChoiceImpl choice) {
|
||||
|
|
@ -46,6 +52,7 @@ public class ChoiceImpl implements Choice {
|
|||
this.subMessage = choice.subMessage;
|
||||
this.searchEnabled = choice.searchEnabled;
|
||||
this.searchText = choice.searchText;
|
||||
this.hintType = choice.hintType;
|
||||
this.choices.addAll(choice.choices);
|
||||
this.choiceKey = choice.choiceKey;
|
||||
this.keyChoices = choice.keyChoices; // list should never change for the same object so copy by reference TODO: check errors with that, it that ok? Color list is static
|
||||
|
|
@ -302,4 +309,9 @@ public class ChoiceImpl implements Choice {
|
|||
public String getSpecialHint() {
|
||||
return this.specialHint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChoiceHintType getHintType() {
|
||||
return this.hintType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue