12using event_data_wrapper = std::variant< event::pending_human_n_event, event::pending_human_f_n_event, event::pending_human_p_event, event::pending_human_f_p_event>;
39 if(
name ==
"opt_button") {
40 return make_element_by_type<event_option_button>(
state,
id);
41 }
else if(
name ==
"auto_button") {
42 return make_element_by_type<event_auto_button>(
state,
id);
72 auto& font =
state.font_collection.get_font(
state, font_index);
73 auto text_height = int32_t(std::ceil(font.line_height(font_size)));
112 return "ew_issue_option_window";
135 return "alice_nation_event_button";
141 return "alice_prov_event_button";
147 return "alice_election_event_button";
154 return "event_country_option_start";
170 return "eew_event_option_start";
180 return "event_country_option_start";
190 return "event_major_option_start";
200 return "event_province_option_start";
void on_update(sys::state &state) noexcept 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
event_data_wrapper event_data
virtual event_pool_slot get_pool_slot() noexcept
message_result get(sys::state &state, Cyto::Any &payload) noexcept override
virtual std::string_view get_option_start_element_name() noexcept
void on_create(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 on_update(sys::state &state) noexcept override
std::string_view get_row_element_name() override
void on_create(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
bool get_horizontal_flip(sys::state &state) noexcept override
void on_reset_text(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_create(sys::state &state) noexcept override
void update_tooltip(sys::state &state, int32_t x, int32_t y, text::columnar_layout &contents) noexcept override
tooltip_behavior has_tooltip(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
tooltip_behavior has_tooltip(sys::state &state) noexcept override
void update_tooltip(sys::state &state, int32_t x, int32_t y, text::columnar_layout &contents) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_create(sys::state &state) noexcept override
std::string_view get_row_element_name() override
static constexpr std::string_view window_element_name
std::string_view get_option_start_element_name() noexcept override
event_pool_slot get_pool_slot() noexcept override
std::string_view get_row_element_name() override
std::string_view get_option_start_element_name() noexcept override
event_pool_slot get_pool_slot() noexcept override
static constexpr std::string_view window_element_name
std::string_view get_option_start_element_name() noexcept override
static constexpr std::string_view window_element_name
event_pool_slot get_pool_slot() noexcept override
std::string_view get_row_element_name() override
event_pool_slot get_pool_slot() noexcept override
std::string_view get_option_start_element_name() noexcept override
static constexpr std::string_view window_element_name
audio_instance & get_event_sound(sys::state &state)
int32_t size_from_font_id(uint16_t id)
void add_line(sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
ankerl::unordered_dense::map< uint32_t, substitution > substitution_map
font_selection font_index_from_font_id(sys::state &state, uint16_t id)
void close_expired_event_windows(sys::state &state)
void populate_event_submap(sys::state &state, text::substitution_map &sub, std::variant< event::pending_human_n_event, event::pending_human_f_n_event, event::pending_human_p_event, event::pending_human_f_p_event > const &phe) noexcept
void clear_event_windows(sys::state &state)
bool events_pause_test(sys::state &state)
std::variant< event::pending_human_n_event, event::pending_human_f_n_event, event::pending_human_p_event, event::pending_human_f_p_event > event_data_wrapper
void new_event_window(sys::state &state, event_data_wrapper dat)
union ui::element_data::internal_data data