ZonePickerButton ​
Inherits: Button
A button that shows the zone chosen and opens the zone dialog (ZoneSelectionDialog) to choose another: the default zone of a world, the zone a zone is a part of. It replaces a drop-down of zones. It gives the zones to offer with setup, and sends zone_chosen when the user chooses one (the button does not change anything else).
Variables ​
int | zone_id | 0 |
String | none_text | "None" |
Methods ​
void | setup( rows: Array[Dictionary], chosen_id: int, p_none_text: String = "None" ) |
void | set_zone( chosen_id: int ) |
Array[int] | get_offered_ids() |
Signals ​
zone_chosen( zone_id: int ) ​
The user chose a zone (0 = the "no zone" choice)
Variable descriptions ​
int zone_id = 0 ​
The id of the zone shown on the button (0 = none)
String none_text = "None" ​
The text of the "no zone" choice and of the button when there is none (for example "None")
Method descriptions ​
void setup( rows: Array[Dictionary], chosen_id: int, p_none_text: String = "None" ) ​
The zones to offer (ZoneLookup.get_tree_list rows, a zone that must not be chosen left out), the zone chosen now and the text of the "no zone" choice
void set_zone( chosen_id: int ) ​
Shows a zone on the button (nothing is sent)
Array[int] get_offered_ids() ​
The ids the dialog offers (for the tests)