33 state.stored_map_mode =
state.map_state.active_map_mode;
35 state.map_state.set_selected_province(dcon::province_id{});
41 state.state_selection.reset();
73 state.game_state_updated.store(
true, std::memory_order_release);
78 dcon::province_id target,
84 while(checked_element !=
nullptr) {
85 if(checked_element ==
state.ui_state.units_root.get())
87 if(checked_element ==
state.ui_state.unit_details_box.get())
89 checked_element = checked_element->
parent;
106 return state.user_settings.effects_volume *
state.user_settings.master_volume;
112 dcon::province_id target,
116 bool army_play =
false;
121 for(
auto a :
state.selected_armies) {
129 for(
auto a :
state.selected_navies) {
151 dcon::province_id target,
154 auto owner =
state.world.province_get_nation_from_province_ownership(target);
156 state.open_diplomacy(owner);
163 auto owner =
state.world.province_get_nation_from_province_ownership(
state.map_state.selected_province);
171 state.world.nation_set_is_player_controlled(
state.local_player_nation,
false);
172 state.local_player_nation = owner;
173 state.world.nation_set_is_player_controlled(
state.local_player_nation,
true);
174 if(
state.ui_state.nation_picker) {
175 state.ui_state.nation_picker->impl_on_update(
state);
184 auto prov =
state.map_state.selected_province;
185 auto sdef =
state.world.province_get_state_from_abstract_state_membership(prov);
186 state.state_select(sdef);
190 if(
state.ui_state.province_window) {
196 state.x_drag_start = x;
197 state.y_drag_start = y;
198 state.drag_selecting =
true;
203 state.is_dragging =
false;
204 if(
state.ui_state.drag_target) {
205 state.on_drag_finished(x, y, mod);
214 state.ui_state.under_mouse->impl_on_rbutton_down(
216 state.ui_state.relative_mouse_location.x,
217 state.ui_state.relative_mouse_location.y,
222 state.ui_state.under_mouse->impl_on_lbutton_down(
224 state.ui_state.relative_mouse_location.x,
225 state.ui_state.relative_mouse_location.y,
228 state.ui_state.left_mouse_hold_target =
state.ui_state.under_mouse;
245 auto mouse_pos = glm::vec2(x, y);
246 auto screen_size = glm::vec2(
state.x_size,
state.y_size);
248 if(!
state.map_state.screen_to_map(mouse_pos, screen_size, current_view, map_pos)) {
251 map_pos *= glm::vec2(
float(
state.map_state.map_data.size_x),
float(
state.map_state.map_data.size_y));
252 auto idx = int32_t(
state.map_state.map_data.size_y - map_pos.y) * int32_t(
state.map_state.map_data.size_x) + int32_t(map_pos.x);
254 if(0 <= idx &&
size_t(idx) <
state.map_state.map_data.province_id_map.size()) {
258 if(
state.selected_armies.size() > 0 ||
state.selected_navies.size() > 0) {
259 state.current_scene.rbutton_selected_units(
state,
state.local_player_nation,
id, mod);
261 state.current_scene.rbutton_province(
state,
state.local_player_nation,
id, mod);
270 state.current_scene.on_drag_start(
state, x, y, mod);
275 state.ui_state.edit_target =
nullptr;
280 if(
state.ui_state.under_mouse !=
nullptr && !under_mouse_belongs_on_map) {
290 state.ui_state.edit_target =
nullptr;
292 if(
state.ui_state.under_mouse !=
nullptr) {
301 auto rel_x =
state.ui_state.relative_mouse_location.x;
302 auto rel_y =
state.ui_state.relative_mouse_location.y;
304 bool mouse_over_target =
state.ui_state.under_mouse ==
state.ui_state.left_mouse_hold_target;
306 if(!
state.current_scene.allow_drag_selection) {
307 if(mouse_over_target) {
308 state.ui_state.under_mouse->impl_on_lbutton_up(
state, rel_x, rel_y, mod,
true);
310 state.ui_state.left_mouse_hold_target->impl_on_lbutton_up(
state, rel_x, rel_y, mod,
false);
313 if(mouse_over_target) {
314 state.ui_state.left_mouse_hold_target =
nullptr;
315 state.ui_state.under_mouse->impl_on_lbutton_up(
state, rel_x, rel_y, mod,
true);
316 }
else if(!mouse_over_target && !
state.drag_selecting) {
317 state.ui_state.left_mouse_hold_target->impl_on_lbutton_up(
state, rel_x, rel_y, mod,
false);
319 state.ui_state.left_mouse_hold_target =
nullptr;
320 if(
state.ui_state.scrollbar_continuous_movement) {
323 state.ui_state.scrollbar_continuous_movement =
false;
330 state.selected_armies.clear();
331 state.selected_navies.clear();
335 auto mid_point =
state.world.province_get_mid_point(
province);
336 auto map_pos =
state.map_state.normalize_map_coord(mid_point);
337 auto screen_size = glm::vec2{ float(
state.x_size), float(
state.y_size) };
338 glm::vec2 screen_pos;
339 if(
state.map_state.map_to_screen(
state, map_pos, screen_size, screen_pos)) {
340 if(
state.x_drag_start <= int32_t(screen_pos.x) && int32_t(screen_pos.x) <= x
341 &&
state.y_drag_start <= int32_t(screen_pos.y) && int32_t(screen_pos.y) <= y) {
350 auto adj =
state.world.get_province_adjacency_by_province_pair(
province, port_to);
352 auto id = adj.index();
353 auto& border =
state.map_state.map_data.borders[id];
354 auto& vertex =
state.map_state.map_data.border_vertices[border.start_index + border.count / 2];
356 auto map_x = vertex.position.x;
357 auto map_y = vertex.position.y;
359 glm::vec2 map_pos(map_x, 1.0f - map_y);
360 auto screen_size = glm::vec2{ float(
state.x_size), float(
state.y_size) };
361 glm::vec2 screen_pos;
362 if(
state.map_state.map_to_screen(
state, map_pos, screen_size, screen_pos)) {
363 if(
state.x_drag_start <= int32_t(screen_pos.x)
364 && int32_t(screen_pos.x) <= x
365 &&
state.y_drag_start <= int32_t(screen_pos.y)
366 && int32_t(screen_pos.y) <= y
376 auto province =
state.world.army_get_location_from_army_location(a);
381 auto loc =
state.world.navy_get_location_from_navy_location(n);
382 if(loc.index() >=
state.province_definitions.first_sea_province.index()) {
399 for(
auto a :
state.world.nation_get_army_control(
state.local_player_nation)) {
400 if(!a.get_army().get_navy_from_army_transport() && !a.get_army().get_battle_from_army_battle_participation() && !a.get_army().get_is_retreating()) {
402 state.select(a.get_army());
407 for(
auto a :
state.world.nation_get_navy_control(
state.local_player_nation)) {
408 if(!a.get_navy().get_battle_from_navy_battle_participation() && !a.get_navy().get_is_retreating()) {
410 state.select(a.get_navy());
414 if(!
state.selected_armies.empty() && !
state.selected_navies.empty()) {
415 state.selected_navies.clear();
418 if(!
state.selected_armies.empty() || !
state.selected_navies.empty()) {
419 if(
state.ui_state.province_window) {
420 state.ui_state.province_window->set_visible(
state,
false);
421 state.map_state.set_selected_province(dcon::province_id{});
424 if(!
state.selected_armies.empty()) {
430 state.game_state_updated.store(
true, std::memory_order_release);
434 bool insignificant_movement =
435 std::abs(x -
state.x_drag_start) <= int32_t(std::ceil(
state.x_size * 0.0025))
436 && std::abs(y -
state.y_drag_start) <= int32_t(std::ceil(
state.x_size * 0.0025));
438 state.ui_state.scrollbar_timer = 0;
439 if(
state.ui_state.under_mouse !=
nullptr || !
state.drag_selecting) {
440 state.drag_selecting =
false;
442 }
else if(insignificant_movement) {
444 state.drag_selecting =
false;
448 state.game_state_updated.store(
true, std::memory_order_release);
451 state.drag_selecting =
false;
453 if(x <
state.x_drag_start)
454 std::swap(x,
state.x_drag_start);
455 if(y <
state.y_drag_start)
456 std::swap(y,
state.y_drag_start);
458 state.current_scene.drag_selection(
state, x, y, mod);
464 if(
state.user_settings.left_mouse_click_hold_and_release &&
state.ui_state.left_mouse_hold_target) {
470 if(!
state.ui_state.under_mouse) {
475 if(
state.user_settings.left_mouse_click_hold_and_release
476 &&
state.ui_state.left_mouse_hold_target
477 && !
state.current_scene.allow_drag_selection
482 state.ui_state.scrollbar_timer = 0;
488 if(!
state.ui_state.edit_target &&
state.user_settings.wasd_for_map_movement) {
511 return state.current_scene.keycode_mapping(
state, keycode, mod);
522 state.map_state.on_key_down(keycode, mod);
528 state.map_state.on_key_down(keycode, mod);
538 auto selected_group =
state.selected_army_group;
539 auto selected_province =
state.map_state.selected_province;
541 switch(
state.selected_army_group_order) {
545 state.toggle_designated_port(selected_group, selected_province);
548 state.toggle_enforce_control_position(selected_group, selected_province);
551 state.toggle_defensive_position(selected_group, selected_province);
559 auto selected_group =
state.selected_army_group;
560 auto selected_province =
state.map_state.selected_province;
567 if(!selected_group) {
570 state.deselect_army_group();
574 }
if(
state.map_state.selected_province) {
577 if(!selected_group) {
578 state.new_army_group(
state.map_state.selected_province);
580 }
else if(selected_group) {
582 state.toggle_designated_port(selected_group, selected_province);
584 state.toggle_defensive_position(selected_group, selected_province);
593 if(
state.ui_state.console_window->is_visible()) {
595 }
else if(!
state.selected_armies.empty() || !
state.selected_navies.empty()) {
597 state.game_state_updated.store(
true, std::memory_order::release);
604 if(
auto cap =
state.world.nation_get_capital(
nation); cap) {
607 state.map_state.center_map_on_province(
state, cap);
643 if(ctrl_group != 0) {
645 for(
const auto a :
state.selected_armies) {
646 auto& v =
state.ctrl_armies[ctrl_group];
647 auto it = std::find(v.begin(), v.end(), a);
655 for(
const auto n :
state.selected_navies) {
656 auto& v =
state.ctrl_navies[ctrl_group];
657 auto it = std::find(v.begin(), v.end(), n);
665 state.game_state_updated.store(
true, std::memory_order_release);
667 for(
const auto a :
state.ctrl_armies[ctrl_group]) {
670 for(
const auto n :
state.ctrl_navies[ctrl_group]) {
673 state.game_state_updated.store(
true, std::memory_order_release);
677 if(!
state.ui_state.topbar_subwindow->is_visible()) {
678 state.map_state.on_key_down(keycode, mod);
682 if(
state.ui_state.mouse_sensitive_target) {
683 state.ui_state.mouse_sensitive_target->set_visible(
state,
false);
684 state.ui_state.mouse_sensitive_target =
nullptr;
697 if(
state.ui_state.edit_target) {
698 state.ui_state.edit_target->impl_on_key_down(
state, keycode, mod);
700 state.current_scene.handle_hotkeys(
state, keycode, mod);
705 if(
state.ui_state.console_window_r !=
nullptr) {
706 Cyto::Any payload = std::string(message);
707 state.ui_state.console_window_r->impl_get(
state, payload);
708 if(
true && !(
state.ui_state.console_window_r->is_visible())) {
709 state.ui_state.nation_picker->move_child_to_front(
state.ui_state.console_window_r);
710 state.ui_state.console_window_r->set_visible(
state,
true);
716 if(
state.ui_state.console_window !=
nullptr) {
717 Cyto::Any payload = std::string(message);
718 state.ui_state.console_window->impl_get(
state, payload);
719 if(
true && !(
state.ui_state.console_window->is_visible())) {
720 state.ui_state.root->move_child_to_front(
state.ui_state.console_window);
721 state.ui_state.console_window->set_visible(
state,
true);
728 if(
state.ui_state.units_root) {
729 state.ui_state.units_root->impl_render(
state, 0, 0);
734 if(
state.ui_state.unit_details_box &&
state.ui_state.unit_details_box->is_visible()) {
735 state.ui_state.unit_details_box->impl_render(
state,
state.ui_state.unit_details_box->base_data.position.x,
state.ui_state.unit_details_box->base_data.position.y);
749 if(
state.ui_state.tl_chat_list) {
750 state.ui_state.root->move_child_to_front(
state.ui_state.tl_chat_list);
753 if(!
state.ui_state.ctrl_held_down) {
754 if(
state.ui_state.rgos_root
758 state.ui_state.rgos_root->impl_render(
state, 0, 0);
764 state.ui_state.province_details_root->impl_render(
state, 0, 0);
774 float scaled_mouse_x =
state.mouse_x_position /
state.user_settings.ui_scale;
775 float scaled_mouse_y =
state.mouse_y_position /
state.user_settings.ui_scale;
776 float pos_x =
state.ui_state.unit_details_box->base_data.position.x;
777 float pos_y =
state.ui_state.unit_details_box->base_data.position.y;
779 return state.ui_state.unit_details_box->impl_probe_mouse(
781 int32_t(scaled_mouse_x - pos_x),
782 int32_t(scaled_mouse_y - pos_y),
788 float scaled_mouse_x =
state.mouse_x_position /
state.user_settings.ui_scale;
789 float scaled_mouse_y =
state.mouse_y_position /
state.user_settings.ui_scale;
791 return state.ui_state.units_root->impl_probe_mouse(
793 int32_t(scaled_mouse_x),
794 int32_t(scaled_mouse_y),
800 if(
state.ui_state.unit_details_box &&
state.ui_state.unit_details_box->is_visible()) {
812 if(!
state.ui_state.units_root ||
state.ui_state.ctrl_held_down) {
825 if(!
state.ui_state.military_root) {
829 float scaled_mouse_x =
state.mouse_x_position /
state.user_settings.ui_scale;
830 float scaled_mouse_y =
state.mouse_y_position /
state.user_settings.ui_scale;
832 return state.ui_state.military_root->impl_probe_mouse(
834 int32_t(scaled_mouse_x),
835 int32_t(scaled_mouse_y),
841 float scaled_mouse_x =
state.mouse_x_position /
state.user_settings.ui_scale;
842 float scaled_mouse_y =
state.mouse_y_position /
state.user_settings.ui_scale;
843 float pos_x =
state.ui_state.unit_details_box->base_data.position.x;
844 float pos_y =
state.ui_state.unit_details_box->base_data.position.y;
846 if(
state.ui_state.unit_details_box &&
state.ui_state.unit_details_box->is_visible()) {
847 tooltip_probe =
state.ui_state.unit_details_box->impl_probe_mouse(
state,
848 int32_t(scaled_mouse_x - pos_x),
849 int32_t(scaled_mouse_y - pos_y),
853 tooltip_probe =
state.ui_state.units_root->impl_probe_mouse(
855 int32_t(scaled_mouse_x),
856 int32_t(scaled_mouse_y),
860 return tooltip_probe;
864 if(!
state.ui_state.units_root ||
state.ui_state.ctrl_held_down) {
865 return tooltip_probe;
871 return tooltip_probe;
874 return tooltip_probe;
881 if(
state.selected_armies.size() == 1) {
882 if(!
state.world.army_is_valid(
state.selected_armies[0])) {
883 state.selected_armies.clear();
885 }
else if(
state.selected_navies.size() == 1) {
886 if(!
state.world.navy_is_valid(
state.selected_navies[0])) {
887 state.selected_navies.clear();
890 for(
auto i =
state.selected_armies.size(); i-- > 0; ) {
891 if(!
state.world.army_is_valid(
state.selected_armies[i]) ||
state.world.army_get_controller_from_army_control(
state.selected_armies[i]) !=
state.local_player_nation) {
892 state.selected_armies[i] =
state.selected_armies.back();
893 state.selected_armies.pop_back();
896 for(
auto i =
state.selected_navies.size(); i-- > 0; ) {
897 if(!
state.world.navy_is_valid(
state.selected_navies[i]) ||
state.world.navy_get_controller_from_navy_control(
state.selected_navies[i]) !=
state.local_player_nation) {
898 state.selected_navies[i] =
state.selected_navies.back();
899 state.selected_navies.pop_back();
906 if(
state.ui_state.change_leader_window &&
state.ui_state.change_leader_window->is_visible()) {
908 if(
state.ui_state.military_subwindow->is_visible() ==
false
909 && std::find(
state.selected_armies.begin(),
state.selected_armies.end(), win->
a) ==
state.selected_armies.end()
910 && std::find(
state.selected_navies.begin(),
state.selected_navies.end(), win->
v) ==
state.selected_navies.end()
912 state.ui_state.change_leader_window->set_visible(
state,
false);
917 for(
auto& v :
state.ctrl_armies) {
918 for(
auto i = v.size(); i-- > 0; ) {
919 if(!
state.world.army_is_valid(v[i]) ||
state.world.army_get_controller_from_army_control(v[i]) !=
state.local_player_nation) {
925 for(
auto& v :
state.ctrl_navies) {
926 for(
auto i = v.size(); i-- > 0; ) {
927 if(!
state.world.navy_is_valid(v[i]) ||
state.world.navy_get_controller_from_navy_control(v[i]) !=
state.local_player_nation) {
936 state.ui_state.army_group_window_land->set_visible(
state,
bool(
state.selected_army_group));
940 if(
state.selected_armies.size() +
state.selected_navies.size() > 1) {
941 state.ui_state.multi_unit_selection_window->set_visible(
state,
true);
942 state.ui_state.army_status_window->set_visible(
state,
false);
943 state.ui_state.navy_status_window->set_visible(
state,
false);
944 }
else if(
state.selected_armies.size() == 1) {
945 state.ui_state.multi_unit_selection_window->set_visible(
state,
false);
946 if(
state.ui_state.army_status_window->is_visible() &&
state.ui_state.army_status_window->unit_id !=
state.selected_armies[0]) {
947 state.ui_state.army_status_window->unit_id =
state.selected_armies[0];
948 state.ui_state.army_status_window->impl_on_update(
state);
950 state.ui_state.army_status_window->unit_id =
state.selected_armies[0];
951 state.ui_state.army_status_window->set_visible(
state,
true);
953 state.ui_state.navy_status_window->set_visible(
state,
false);
954 }
else if(
state.selected_navies.size() == 1) {
955 state.ui_state.multi_unit_selection_window->set_visible(
state,
false);
956 state.ui_state.army_status_window->set_visible(
state,
false);
957 if(
state.ui_state.navy_status_window->is_visible() &&
state.ui_state.navy_status_window->unit_id !=
state.selected_navies[0]) {
958 state.ui_state.navy_status_window->unit_id =
state.selected_navies[0];
959 state.ui_state.navy_status_window->impl_on_update(
state);
961 state.ui_state.navy_status_window->unit_id =
state.selected_navies[0];
962 state.ui_state.navy_status_window->set_visible(
state,
true);
965 state.ui_state.multi_unit_selection_window->set_visible(
state,
false);
966 state.ui_state.army_status_window->set_visible(
state,
false);
967 state.ui_state.navy_status_window->set_visible(
state,
false);
972 if(
state.ui_state.unit_details_box &&
state.ui_state.unit_details_box->is_visible()) {
973 state.ui_state.unit_details_box->impl_on_update(
state);
975 if(
state.ui_state.units_root) {
976 state.ui_state.units_root->impl_on_update(
state);
983 if(
state.ui_state.rgos_root) {
984 state.ui_state.rgos_root->impl_on_update(
state);
989 state.ui_state.province_details_root->impl_on_update(
state);
994 if(
state.ui_state.army_combat_window &&
state.ui_state.army_combat_window->is_visible()) {
997 state.ui_state.army_combat_window->set_visible(
state,
false);
1001 state.map_state.map_data.update_borders(
state);
1006 state.map_state.map_data.update_borders(
state);
1011 state.map_state.map_data.update_borders(
state);
1015 state.map_state.map_data.update_borders(
state);
1026 for(
const auto pc :
state.world.nation_get_province_ownership_as_nation(
state.local_player_nation)) {
1032 if(selected_province) {
1038 if(
state.selected_army_group) {
1040 for(
auto position :
state.world.automated_army_group_get_provinces_defend(
state.selected_army_group)) {
1044 for(
auto position :
state.world.automated_army_group_get_provinces_ferry_origin(
state.selected_army_group)) {
1048 for(
auto position :
state.world.automated_army_group_get_provinces_enforce_control(
state.selected_army_group)) {
1055 return state.ui_state.end_screen.get();
1059 return state.ui_state.nation_picker.get();
1063 return state.ui_state.root.get();
1067 return state.ui_state.military_root.get();
1071 return state.ui_state.army_group_selector_root.get();
1075 return state.ui_state.army_group_selector_root.get();
1079 return state.ui_state.select_states_legend.get();
static void show_toggle(sys::state &state)
virtual message_result impl_set(sys::state &state, Cyto::Any &payload) noexcept
dcon::land_battle_id battle
#define assert(condition)
@ notify_player_picks_nation
std::vector< dcon::province_id > can_move_navy(sys::state &state, dcon::nation_id source, dcon::navy_id n, dcon::province_id dest)
bool can_notify_player_picks_nation(sys::state &state, dcon::nation_id source, dcon::nation_id target)
std::vector< dcon::province_id > can_move_army(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::province_id dest)
bool navy_is_in_selection(sys::state &state, int32_t x, int32_t y, dcon::navy_id n)
void update_military_game_scene(sys::state &state)
void render_map_generic(sys::state &state)
void in_game_hotkeys(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
scene_properties nation_picker()
void select_wargoal_state_from_selected_province(sys::state &state)
bool belongs_on_map(sys::state &state, ui::element_base *checked_element)
void on_lbutton_up(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void highlight_given_province(sys::state &state, std::vector< uint32_t > &data, dcon::province_id selected_province)
void handle_lbutton_down_map_interaction(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
ui::mouse_probe recalculate_mouse_probe_military(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
void switch_scene(sys::state &state, scene_id ui_scene)
void military_screen_on_lbutton_up(sys::state &state)
void on_rbutton_down(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void update_ui_state_basic(sys::state &state)
void select_player_nation_from_selected_province(sys::state &state)
@ in_game_military_selector
void render_ui_ingame(sys::state &state)
void render_ui_military(sys::state &state)
void update_ui_unit_details(sys::state &state)
void handle_escape_basic(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void highlight_defensive_positions(sys::state &state, std::vector< uint32_t > &data, dcon::province_id selected_province)
void do_nothing_screen(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
scene_properties basic_game()
ui::mouse_probe recalculate_mouse_probe_units(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
ui::element_base * root_end_screen(sys::state &state)
void highlight_player_nation(sys::state &state, std::vector< uint32_t > &data, dcon::province_id selected_province)
void on_rbutton_down_map(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void console_log_other(sys::state &state, std::string_view message)
ui::element_base * root_game_basic(sys::state &state)
scene_properties state_wargoal_selector()
void open_chat_before_game(sys::state &state)
ui::element_base * root_game_wargoal_state_selection(sys::state &state)
void do_nothing_province_target(sys::state &state, dcon::nation_id nation, dcon::province_id target, sys::key_modifiers mod)
void stop_dragging(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void render_units_info_box(sys::state &state)
void on_lbutton_up_ui_click_hold_and_release(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void open_diplomacy(sys::state &state, dcon::nation_id nation, dcon::province_id target, sys::key_modifiers mod)
void generic_map_scene_update(sys::state &state)
void deselect_units(sys::state &state)
void update_add_units_game_scene(sys::state &state)
void clean_up_basic_game_scene(sys::state &state)
void clean_up_selected_armies_and_navies(sys::state &state)
scene_properties battleplan_editor_add_army()
void render_units(sys::state &state)
ui::mouse_probe recalculate_mouse_probe_identity(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
ui::mouse_probe recalculate_mouse_probe_units_details(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
void state_selector_hotkeys(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void on_key_down(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
sys::virtual_key replace_keycodes_map_movement(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
sys::virtual_key replace_keycodes(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void military_screen_hotkeys(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void console_log_pick_nation(sys::state &state, std::string_view message)
void ui_lbutton(sys::state &state, sys::key_modifiers mod)
void handle_rbutton_down_map_interaction(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void nation_picker_hotkeys(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void render_ui_selection_screen(sys::state &state)
map::map_view get_view(sys::state &state)
bool province_port_is_in_selection(sys::state &state, int32_t x, int32_t y, dcon::province_id province)
bool army_is_in_selection(sys::state &state, int32_t x, int32_t y, dcon::army_id a)
void do_nothing(sys::state &state)
void do_nothing_hotkeys(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
void update_army_group_selection_ui(sys::state &state)
void start_dragging(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
scene_properties battleplan_editor()
void on_lbutton_down_map(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void update_unit_selection_ui(sys::state &state)
ui::element_base * root_game_battleplanner(sys::state &state)
void center_on_capital(sys::state &state, dcon::nation_id nation)
ui::mouse_probe recalculate_mouse_probe_basic(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
void select_units(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
ui::element_base * root_game_battleplanner_add_army(sys::state &state)
ui::element_base * root_pick_nation(sys::state &state)
void on_lbutton_up_map(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
bool province_mid_point_is_in_selection(sys::state &state, int32_t x, int32_t y, dcon::province_id province)
float get_effects_volume(sys::state &state)
void open_chat_during_game(sys::state &state)
scene_properties end_screen()
void send_selected_province_to_province_window(sys::state &state)
ui::mouse_probe recalculate_mouse_probe_units_and_details(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
void handle_drag_stop(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void ui_rbutton(sys::state &state, sys::key_modifiers mod)
void update_basic_game_scene(sys::state &state)
ui::mouse_probe recalculate_tooltip_probe_basic(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
void selected_units_control(sys::state &state, dcon::nation_id nation, dcon::province_id target, sys::key_modifiers mod)
ui::mouse_probe recalculate_tooltip_probe_units_and_details(sys::state &state, ui::mouse_probe mouse_probe, ui::mouse_probe tooltip_probe)
sys::virtual_key replace_keycodes_identity(sys::state &state, sys::virtual_key keycode, sys::key_modifiers mod)
ui::element_base * root_game_battleplanner_unit_selection(sys::state &state)
void on_lbutton_down(sys::state &state, int32_t x, int32_t y, sys::key_modifiers mod)
void update_map_mode(sys::state &state)
void set_map_mode(sys::state &state, mode mode)
constexpr float zoom_close
constexpr float zoom_very_close
constexpr dcon::province_id from_map_id(uint16_t id)
constexpr uint16_t to_map_id(dcon::province_id id)
audio_instance & get_random_province_select_sound(sys::state &state)
audio_instance & get_navy_move_sound(sys::state &state)
void play_effect(sys::state &state, audio_instance &s, float volume)
audio_instance & get_navy_select_sound(sys::state &state)
audio_instance & get_army_select_sound(sys::state &state)
void play_interface_sound(sys::state &state, audio_instance &s, float volume)
audio_instance & get_error_sound(sys::state &state)
audio_instance & get_army_move_sound(sys::state &state)
void open_chat_during_game(sys::state &state)
void open_chat_before_game(sys::state &state)
void close_expired_event_windows(sys::state &state)
constexpr float big_counter_cutoff
void show_main_menu_nation_picker(sys::state &state)
void show_main_menu_nation_basic(sys::state &state)
void open_chat_window(sys::state &state)
void change_cursor(sys::state &state, cursor_type type)
element_base * under_mouse