11 base_data.size.y = int16_t(150);
16 switch(base_data.data.text.get_alignment()) {
26 auto border = base_data.data.text.border_size;
29 delegate->internal_layout,
33 int16_t(base_data.size.x - border.x * 2),
34 int16_t(base_data.size.y - border.y * 2),
35 base_data.data.text.font_handle,
40 populate_layout(
state, container);
45 auto ptr = make_element_by_type<simple_text_element_base>(
state,
id);
48 }
else if(
name ==
"description") {
49 auto ptr = make_element_by_type<error_body_text>(
state,
id);
52 }
else if(
name ==
"agreebutton") {
53 return make_element_by_type<generic_close_button>(
state,
id);
54 }
else if(
name ==
"background") {
55 auto ptr = make_element_by_type<draggable_target>(
state,
id);
56 ptr->base_data.size = base_data.size;
64 auto new_elm = ui::make_element_by_type<ui::error_dialog_window>(
state,
"defaultinfodialog");
66 state.current_scene.get_root(
state)->add_child_to_front(std::move(new_elm));
71 win->body->msg = std::string(body);
72 win->set_visible(
state,
true);
73 win->impl_on_update(
state);
virtual message_result get(sys::state &state, Cyto::Any &payload) noexcept
void on_create(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
simple_text_element_base * title
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
void on_create(sys::state &state) noexcept override
void set_text(sys::state &state, std::string const &new_text)
void add_to_layout_box(sys::state &state, layout_base &dest, layout_box &box, embedded_flag ico)
layout_box open_layout_box(layout_base &dest, int32_t indent)
endless_layout create_endless_layout(sys::state &state, layout &dest, layout_parameters const ¶ms)
void close_layout_box(columnar_layout &dest, layout_box &box)
void popup_error_window(sys::state &state, std::string_view title, std::string_view body)