21 auto content = retrieve<dcon::state_definition_id>(
state,
parent);
27 auto content = retrieve<dcon::state_definition_id>(
state,
parent);
28 state.state_select(content);
35 if(
name ==
"button") {
36 return make_element_by_type<map_state_select_button>(
state,
id);
43 if(payload.holds_type<dcon::nation_id>()) {
44 auto memb =
state.world.state_definition_get_abstract_state_membership(
content);
45 if(memb.begin() == memb.end()) {
46 payload.emplace<dcon::nation_id>(
state.world.national_identity_get_nation_from_identity_holder(
state.national_definitions.rebel_id));
49 auto n = (*(memb.begin())).get_province().get_state_membership().get_capital().get_province_control().get_nation();
50 payload.emplace<dcon::nation_id>(n);
60 return "alice_select_legend_entry";
74 if(
name ==
"legend_title") {
75 return make_element_by_type<map_state_select_title>(
state,
id);
76 }
else if(
name ==
"selectable") {
77 return make_element_by_type<map_state_select_listbox>(
state,
id);
std::vector< dcon::state_definition_id > row_contents
void update(sys::state &state)
message_result get(sys::state &state, Cyto::Any &payload) noexcept override
dcon::state_definition_id content
message_result get(sys::state &state, Cyto::Any &payload) noexcept override
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
void on_update(sys::state &state) noexcept override
std::string_view get_row_element_name() override
void on_update(sys::state &state) noexcept override
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
void set_text(sys::state &state, std::string const &new_text)
#define assert(condition)
std::string produce_simple_string(sys::state const &state, dcon::text_key id)