11 dcon::gfx_object_id def;
17 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
18 auto lid =
state.world.naval_battle_get_admiral_from_attacking_admiral(b);
25 auto owner =
state.world.leader_get_nation_from_leader_loyalty(lid);
26 auto pculture =
state.world.nation_get_primary_culture(owner);
27 auto ltype = pculture.get_group_from_culture_group_membership().get_leader();
30 auto grange = ltype.get_admirals();
31 if(grange.size() > 0) {
44 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
45 auto lid =
state.world.naval_battle_get_admiral_from_attacking_admiral(b);
54 dcon::gfx_object_id def;
60 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
61 auto lid =
state.world.naval_battle_get_admiral_from_defending_admiral(b);
68 auto owner =
state.world.leader_get_nation_from_leader_loyalty(lid);
69 auto pculture =
state.world.nation_get_primary_culture(owner);
70 auto ltype = pculture.get_group_from_culture_group_membership().get_leader();
73 auto grange = ltype.get_admirals();
74 if(grange.size() > 0) {
87 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
88 auto lid =
state.world.naval_battle_get_admiral_from_defending_admiral(b);
100 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
101 auto lid =
state.world.naval_battle_get_admiral_from_attacking_admiral(b);
104 auto name =
state.to_string_view(
state.world.leader_get_name(lid));
114 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
115 auto lid =
state.world.naval_battle_get_admiral_from_defending_admiral(b);
118 auto name =
state.to_string_view(
state.world.leader_get_name(lid));
131 dcon::gfx_object_id gid;
138 auto& gfx_def =
state.ui_defs.gfx[gid];
140 auto& mask_tex =
state.open_gl.asset_textures[dcon::texture_id(gfx_def.type_dependent - 1)];
143 gfx_def.is_vertically_flipped(),
155 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
157 return state.world.nation_get_identity_from_identity_holder(n);
163 dcon::gfx_object_id gid;
170 auto& gfx_def =
state.ui_defs.gfx[gid];
172 auto& mask_tex =
state.open_gl.asset_textures[dcon::texture_id(gfx_def.type_dependent - 1)];
175 gfx_def.is_vertically_flipped(),
187 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
189 return state.world.nation_get_identity_from_identity_holder(n);
197 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
198 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
201 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
202 auto owner = a.get_navy().get_controller_from_navy_control();
204 if(battle_attacker ==
false) {
205 for(
auto r : a.get_navy().get_navy_membership()) {
207 total += r.get_ship().get_org();
217 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
218 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
221 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
222 auto owner = a.get_navy().get_controller_from_navy_control();
224 if(battle_attacker ==
false) {
225 for(
auto r : a.get_navy().get_navy_membership()) {
227 total += r.get_ship().get_strength();
237 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
238 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
241 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
242 auto owner = a.get_navy().get_controller_from_navy_control();
244 if(battle_attacker ==
true) {
245 for(
auto r : a.get_navy().get_navy_membership()) {
247 total += r.get_ship().get_org();
257 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
258 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
261 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
262 auto owner = a.get_navy().get_controller_from_navy_control();
264 if(battle_attacker ==
true) {
265 for(
auto r : a.get_navy().get_navy_membership()) {
267 total += r.get_ship().get_strength();
279 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
280 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
283 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
284 auto owner = a.get_navy().get_controller_from_navy_control();
286 if(battle_attacker ==
false) {
287 for(
auto r : a.get_navy().get_navy_membership()) {
289 total += r.get_ship().get_org();
299 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
300 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
303 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
304 auto owner = a.get_navy().get_controller_from_navy_control();
306 if(battle_attacker ==
false) {
307 for(
auto r : a.get_navy().get_navy_membership()) {
309 total += r.get_ship().get_strength();
319 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
320 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
323 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
324 auto owner = a.get_navy().get_controller_from_navy_control();
326 if(battle_attacker ==
true) {
327 for(
auto r : a.get_navy().get_navy_membership()) {
329 total += r.get_ship().get_org();
339 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
340 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
343 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
344 auto owner = a.get_navy().get_controller_from_navy_control();
346 if(battle_attacker ==
true) {
347 for(
auto r : a.get_navy().get_navy_membership()) {
349 total += r.get_ship().get_strength();
360 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
361 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
363 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
364 auto owner = a.get_navy().get_controller_from_navy_control();
366 if(battle_attacker ==
false) {
367 for(
auto r : a.get_navy().get_navy_membership()) {
368 auto type = r.get_ship().get_type();
380 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
381 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
383 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
384 auto owner = a.get_navy().get_controller_from_navy_control();
386 if(battle_attacker ==
false) {
387 for(
auto r : a.get_navy().get_navy_membership()) {
388 auto type = r.get_ship().get_type();
400 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
401 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
403 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
404 auto owner = a.get_navy().get_controller_from_navy_control();
406 if(battle_attacker ==
false) {
407 for(
auto r : a.get_navy().get_navy_membership()) {
408 auto type = r.get_ship().get_type();
420 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
421 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
423 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
424 auto owner = a.get_navy().get_controller_from_navy_control();
426 if(battle_attacker ==
true) {
427 for(
auto r : a.get_navy().get_navy_membership()) {
428 auto type = r.get_ship().get_type();
440 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
441 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
443 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
444 auto owner = a.get_navy().get_controller_from_navy_control();
446 if(battle_attacker ==
true) {
447 for(
auto r : a.get_navy().get_navy_membership()) {
448 auto type = r.get_ship().get_type();
460 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
461 auto w =
state.world.naval_battle_get_war_from_naval_battle_in_war(b);
463 for(
auto a :
state.world.naval_battle_get_navy_battle_participation(b)) {
464 auto owner = a.get_navy().get_controller_from_navy_control();
466 if(battle_attacker ==
true) {
467 for(
auto r : a.get_navy().get_navy_membership()) {
468 auto type = r.get_ship().get_type();
479 std::string_view get_row_element_name()
override {
480 return "alice_combat_modifier";
483 subwindow.
data = content;
488 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
489 auto both_dice =
state.world.naval_battle_get_dice_rolls(b);
491 auto defender_dice = (both_dice >> 4) & 0x0F;
493 auto defender_per =
state.world.leader_get_personality(
state.world.naval_battle_get_admiral_from_defending_admiral(b));
494 auto defender_bg =
state.world.leader_get_background(
state.world.naval_battle_get_admiral_from_defending_admiral(b));
497 int32_t(
state.world.leader_trait_get_defense(defender_per) +
state.world.leader_trait_get_defense(defender_bg));
500 if(defence_bonus != 0)
507 std::string_view get_row_element_name()
override {
508 return "alice_combat_modifier";
511 subwindow.
data = content;
516 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
517 auto both_dice =
state.world.naval_battle_get_dice_rolls(b);
518 auto attacker_dice = both_dice & 0x0F;
520 auto attacker_per =
state.world.leader_get_personality(
state.world.naval_battle_get_admiral_from_attacking_admiral(b));
521 auto attacker_bg =
state.world.leader_get_background(
state.world.naval_battle_get_admiral_from_attacking_admiral(b));
524 int32_t(
state.world.leader_trait_get_attack(attacker_per) +
state.world.leader_trait_get_attack(attacker_bg));
527 if(attack_bonus != 0)
538 if(
name ==
"shield") {
539 return make_element_by_type<nc_attacker_flag>(
state,
id);
540 }
else if(
name ==
"leader_icon") {
541 return make_element_by_type<nc_attacker_leader_img>(
state,
id);
542 }
else if(
name ==
"leader_name") {
543 return make_element_by_type<nc_attacking_leader_name>(
state,
id);
544 }
else if(
name ==
"morale") {
545 return make_element_by_type<nc_attacker_org>(
state,
id);
546 }
else if(
name ==
"strength") {
547 return make_element_by_type<nc_attacker_str>(
state,
id);
548 }
else if(
name ==
"morale_text") {
549 return make_element_by_type<nc_attacker_org_txt>(
state,
id);
550 }
else if(
name ==
"strength_text") {
551 return make_element_by_type<nc_attacker_str_txt>(
state,
id);
552 }
else if(
name ==
"big_ship_icon") {
553 return make_element_by_type<lc_static_icon<0>>(
state, id);
554 }
else if(
name ==
"small_ship_icon") {
555 return make_element_by_type<lc_static_icon<1>>(
state, id);
556 }
else if(
name ==
"trade_ship_icon") {
557 return make_element_by_type<lc_static_icon<2>>(
state, id);
558 }
else if(
name ==
"big_ship_value") {
559 return make_element_by_type<nc_attacker_bs_txt>(
state,
id);
560 }
else if(
name ==
"small_ship_value") {
561 return make_element_by_type<nc_attacker_ss_txt>(
state,
id);
562 }
else if(
name ==
"trade_ship_value") {
563 return make_element_by_type<nc_attacker_ts_txt>(
state,
id);
564 }
else if(
name ==
"modifiers") {
565 return make_element_by_type<nc_attacker_combat_modifiers>(
state,
id);
575 if(
name ==
"shield") {
576 return make_element_by_type<nc_defender_flag>(
state,
id);
577 }
else if(
name ==
"leader_icon") {
578 return make_element_by_type<nc_defending_leader_img>(
state,
id);
579 }
else if(
name ==
"leader_name") {
580 return make_element_by_type<nc_defending_leader_name>(
state,
id);
581 }
else if(
name ==
"morale") {
582 return make_element_by_type<nc_defender_org>(
state,
id);
583 }
else if(
name ==
"strength") {
584 return make_element_by_type<nc_defender_str>(
state,
id);
585 }
else if(
name ==
"morale_text") {
586 return make_element_by_type<nc_defender_org_txt>(
state,
id);
587 }
else if(
name ==
"strength_text") {
588 return make_element_by_type<nc_defender_str_txt>(
state,
id);
589 }
else if(
name ==
"big_ship_icon") {
590 return make_element_by_type<lc_static_icon<0>>(
state, id);
591 }
else if(
name ==
"small_ship_icon") {
592 return make_element_by_type<lc_static_icon<1>>(
state, id);
593 }
else if(
name ==
"trade_ship_icon") {
594 return make_element_by_type<lc_static_icon<2>>(
state, id);
595 }
else if(
name ==
"big_ship_value") {
596 return make_element_by_type<nc_defender_bs_txt>(
state,
id);
597 }
else if(
name ==
"small_ship_value") {
598 return make_element_by_type<nc_defender_ss_txt>(
state,
id);
599 }
else if(
name ==
"trade_ship_value") {
600 return make_element_by_type<nc_defender_ts_txt>(
state,
id);
601 }
else if(
name ==
"modifiers") {
602 return make_element_by_type<nc_defender_combat_modifiers>(
state,
id);
621 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
635 auto b = retrieve<dcon::naval_battle_id>(
state,
parent);
636 auto loc =
state.world.naval_battle_get_location_from_naval_battle_location(b);
637 auto name =
state.world.province_get_name(loc);
653 if(
name ==
"combat_bg") {
654 return make_element_by_type<opaque_element_base>(
state,
id);
655 }
else if(
name ==
"label_battlename") {
656 return make_element_by_type<nbattle_name>(
state,
id);
657 }
else if(
name ==
"combat_retreat") {
658 return make_element_by_type<nc_retreat_button>(
state,
id);
659 }
else if(
name ==
"closebutton") {
660 return make_element_by_type<generic_close_button>(
state,
id);
661 }
else if(
name ==
"attacker") {
662 return make_element_by_type<naval_combat_attacker_window>(
state,
id);
663 }
else if(
name ==
"defender") {
664 return make_element_by_type<naval_combat_defender_window>(
state,
id);
673 battle = dcon::naval_battle_id{};
679 if(payload.holds_type<dcon::naval_battle_id>()) {
680 payload.emplace<dcon::naval_battle_id>(
battle);
682 }
else if(payload.holds_type<dcon::province_id>()) {
683 payload.emplace<dcon::province_id>(
state.world.naval_battle_get_location_from_naval_battle_location(
battle));
695 visible = !(retrieve< military::naval_battle_report*>(
state,
parent)->player_on_winning_side);
697 void render(
sys::state&
state, int32_t x, int32_t y)
noexcept override {
705 visible = (retrieve< military::naval_battle_report*>(
state,
parent)->player_on_winning_side);
707 void render(
sys::state&
state, int32_t x, int32_t y)
noexcept override {
714 auto loc = retrieve< military::naval_battle_report*>(
state,
parent)->location;
715 auto name =
state.world.province_get_name(loc);
722 dcon::gfx_object_id def;
737 auto owner =
state.world.leader_get_nation_from_leader_loyalty(lid);
738 auto pculture =
state.world.nation_get_primary_culture(owner);
739 auto ltype = pculture.get_group_from_culture_group_membership().get_leader();
742 auto grange = ltype.get_admirals();
743 if(grange.size() > 0) {
774 auto name =
state.to_string_view(
state.world.leader_get_name(lid));
782 dcon::gfx_object_id def;
797 auto owner =
state.world.leader_get_nation_from_leader_loyalty(lid);
798 auto pculture =
state.world.nation_get_primary_culture(owner);
799 auto ltype = pculture.get_group_from_culture_group_membership().get_leader();
802 auto grange = ltype.get_admirals();
803 if(grange.size() > 0) {
834 auto name =
state.to_string_view(
state.world.leader_get_name(lid));
847 if(prestige_value > 0) {
849 }
else if(prestige_value < 0) {
862 if(prestige_value > 0) {
864 }
else if(prestige_value < 0) {
1068 if(prov && prov.value <
state.province_definitions.first_sea_province.value) {
1069 state.map_state.set_selected_province(prov);
1073 state.map_state.center_map_on_province(
state, prov);
1129 auto new_elm = ui::make_element_by_type<ui::naval_combat_end_popup>(
state,
"endofnavalcombatpopup");
1130 auto ptr = new_elm.get();
1134 state.ui_state.
root->add_child_to_front(std::move(new_elm));
1139 ptr->set_visible(
state,
true);
1140 state.ui_state.
root->add_child_to_front(std::move(ptr));
1145 if(
name ==
"background") {
1146 return make_element_by_type<draggable_target>(
state,
id);
1147 }
else if(
name ==
"combat_end_naval_lost") {
1148 return make_element_by_type<nc_loss_image>(
state,
id);
1149 }
else if(
name ==
"combat_end_naval_won") {
1150 return make_element_by_type<nc_win_image>(
state,
id);
1151 }
else if(
name ==
"line1") {
1152 return make_element_by_type<nc_result_battle_name>(
state,
id);
1153 }
else if(
name ==
"ourleader_photo") {
1154 return make_element_by_type<nc_our_leader_img>(
state,
id);
1155 }
else if(
name ==
"ourleader") {
1156 return make_element_by_type<nc_our_leader_name>(
state,
id);
1157 }
else if(
name ==
"prestige_number") {
1158 return make_element_by_type<nc_our_prestige>(
state,
id);
1159 }
else if(
name ==
"we_number") {
1160 return make_element_by_type<lc_empty_text>(
state,
id);
1161 }
else if(
name ==
"enemyleader_photo") {
1162 return make_element_by_type<nc_their_leader_img>(
state,
id);
1163 }
else if(
name ==
"enemyleader") {
1164 return make_element_by_type<nc_their_leader_name>(
state,
id);
1165 }
else if(
name ==
"prestige_number2") {
1166 return make_element_by_type<nc_their_prestige>(
state,
id);
1167 }
else if(
name ==
"we_number2") {
1168 return make_element_by_type<lc_empty_text>(
state,
id);
1169 }
else if(
name ==
"our_unit_type_1") {
1170 return make_element_by_type<lc_static_icon<3>>(
state, id);
1171 }
else if(
name ==
"our_unit_type_1_1_text") {
1172 return make_element_by_type<nc_o_initial_bs>(
state,
id);
1173 }
else if(
name ==
"our_unit_type_1_2_text") {
1174 return make_element_by_type<nc_o_loss_bs>(
state,
id);
1175 }
else if(
name ==
"our_unit_type_1_3_text") {
1176 return make_element_by_type<nc_o_rem_bs>(
state,
id);
1177 }
else if(
name ==
"our_unit_type_2") {
1178 return make_element_by_type<lc_static_icon<4>>(
state, id);
1179 }
else if(
name ==
"our_unit_type_2_1_text") {
1180 return make_element_by_type<nc_o_initial_ss>(
state,
id);
1181 }
else if(
name ==
"our_unit_type_2_2_text") {
1182 return make_element_by_type<nc_o_loss_ss>(
state,
id);
1183 }
else if(
name ==
"our_unit_type_2_3_text") {
1184 return make_element_by_type<nc_o_rem_ss>(
state,
id);
1185 }
else if(
name ==
"our_unit_type_3") {
1186 return make_element_by_type<lc_static_icon<5>>(
state, id);
1187 }
else if(
name ==
"our_unit_type_3_1_text") {
1188 return make_element_by_type<nc_o_initial_ts>(
state,
id);
1189 }
else if(
name ==
"our_unit_type_3_2_text") {
1190 return make_element_by_type<nc_o_loss_ts>(
state,
id);
1191 }
else if(
name ==
"our_unit_type_3_3_text") {
1192 return make_element_by_type<nc_o_rem_ts>(
state,
id);
1193 }
else if(
name ==
"enemy_unit_type_1") {
1194 return make_element_by_type<lc_static_icon<3>>(
state, id);
1195 }
else if(
name ==
"enemy_unit_type_1_1_text") {
1196 return make_element_by_type<nc_t_initial_bs>(
state,
id);
1197 }
else if(
name ==
"enemy_unit_type_1_2_text") {
1198 return make_element_by_type<nc_t_loss_bs>(
state,
id);
1199 }
else if(
name ==
"enemy_unit_type_1_3_text") {
1200 return make_element_by_type<nc_t_rem_bs>(
state,
id);
1201 }
else if(
name ==
"enemy_unit_type_2") {
1202 return make_element_by_type<lc_static_icon<4>>(
state, id);
1203 }
else if(
name ==
"enemy_unit_type_2_1_text") {
1204 return make_element_by_type<nc_t_initial_ss>(
state,
id);
1205 }
else if(
name ==
"enemy_unit_type_2_2_text") {
1206 return make_element_by_type<nc_t_loss_ss>(
state,
id);
1207 }
else if(
name ==
"enemy_unit_type_2_3_text") {
1208 return make_element_by_type<nc_t_rem_ss>(
state,
id);
1209 }
else if(
name ==
"enemy_unit_type_3") {
1210 return make_element_by_type<lc_static_icon<5>>(
state, id);
1211 }
else if(
name ==
"enemy_unit_type_3_1_text") {
1212 return make_element_by_type<nc_t_initial_ts>(
state,
id);
1213 }
else if(
name ==
"enemy_unit_type_3_2_text") {
1214 return make_element_by_type<nc_t_loss_ts>(
state,
id);
1215 }
else if(
name ==
"enemy_unit_type_3_3_text") {
1216 return make_element_by_type<nc_t_rem_ts>(
state,
id);
1217 }
else if(
name ==
"our_total_armies") {
1218 return make_element_by_type<nc_o_initial_total>(
state,
id);
1219 }
else if(
name ==
"our_total_loss") {
1220 return make_element_by_type<nc_o_loss_total>(
state,
id);
1221 }
else if(
name ==
"our_total_left") {
1222 return make_element_by_type<nc_o_rem_total>(
state,
id);
1223 }
else if(
name ==
"enemy_total_armies") {
1224 return make_element_by_type<nc_t_initial_total>(
state,
id);
1225 }
else if(
name ==
"enemy_total_loss") {
1226 return make_element_by_type<nc_t_loss_total>(
state,
id);
1227 }
else if(
name ==
"enemy_total_left") {
1228 return make_element_by_type<nc_t_rem_total>(
state,
id);
1229 }
else if(
name ==
"agreebutton") {
1230 auto ptr = make_element_by_type<nc_close_button>(
state,
id);
1231 ptr->base_data.position.y += 146;
1233 }
else if(
name ==
"declinebutton") {
1234 auto ptr = make_element_by_type<nc_goto_location_button>(
state,
id);
1235 ptr->base_data.position.y += 146;
1238 }
else if(
name ==
"centerok") {
1239 return make_element_by_type<invisible_element>(
state,
id);
1240 }
else if(
name ==
"warscore") {
1241 return make_element_by_type<nc_warscore>(
state,
id);
1242 }
else if(
name ==
"winorlose") {
1243 return make_element_by_type<nc_win_lose>(
state,
id);
1249inline void nc_close_button::button_action(
sys::state&
state)
noexcept {
1250 parent->set_visible(
state,
false);
1251 auto uptr =
state.ui_state.
root->remove_child(parent);
void impl_on_update(sys::state &state) noexcept override
virtual message_result get(sys::state &state, Cyto::Any &payload) noexcept
void set_visible(sys::state &state, bool vis)
void render(sys::state &state, int32_t x, int32_t y) noexcept override
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
std::unique_ptr< element_base > make_child(sys::state &state, std::string_view name, dcon::gui_def_id id) noexcept override
message_result get(sys::state &state, Cyto::Any &payload) noexcept override
void on_create(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
dcon::naval_battle_id battle
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
dcon::national_identity_id get_current_nation(sys::state &state) noexcept override
void render(sys::state &state, int32_t x, int32_t y) noexcept 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
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void render(sys::state &state, int32_t x, int32_t y) noexcept override
void on_create(sys::state &state) noexcept override
dcon::national_identity_id get_current_nation(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
void on_update(sys::state &state) noexcept override
std::vector< lc_modifier_data > row_contents
void update(sys::state &state)
void set_text(sys::state &state, std::string const &new_text)
void on_create(sys::state &state) noexcept override
#define assert(condition)
void retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
bool can_retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
constexpr float zoom_very_close
dcon::nation_id get_naval_battle_lead_defender(sys::state &state, dcon::naval_battle_id b)
war_role get_role(sys::state const &state, dcon::war_id w, dcon::nation_id n)
dcon::nation_id get_naval_battle_lead_attacker(sys::state &state, dcon::naval_battle_id b)
constexpr int32_t days_before_retreat
void render_masked_rect(sys::state const &state, color_modification enabled, float x, float y, float width, float height, GLuint texture_handle, GLuint mask_texture_handle, ui::rotation r, bool flipped, bool rtl)
GLuint get_texture_handle(sys::state &state, dcon::texture_id id, bool keep_data)
uint32_t reduce(uint32_t value_in, uint32_t upper_bound)
uint64_t get_random(sys::state const &state, uint32_t value_in)
void play_effect(sys::state &state, audio_instance &s, float volume)
audio_instance & get_random_naval_battle_sound(sys::state &state)
std::string prettify(int64_t num)
std::string format_float(float num, size_t digits)
void add_line(sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
void add_line_with_condition(sys::state &state, layout_base &dest, std::string_view key, bool condition_met, int32_t indent)
std::string produce_simple_string(sys::state const &state, dcon::text_key id)
std::string format_percentage(float num, size_t digits)
void display_leader_attributes(sys::state &state, dcon::leader_id lid, text::layout_base &contents, int32_t indent)
ogl::color_modification get_color_modification(bool is_under_mouse, bool is_disabled, bool is_interactable)
uint16_t attacker_small_losses
uint16_t defender_big_losses
uint16_t attacker_small_ships
uint16_t defender_small_losses
uint16_t attacker_big_losses
uint16_t attacker_big_ships
bool player_on_winning_side
uint16_t defender_small_ships
uint16_t defender_transport_losses
uint16_t defender_transport_ships
dcon::leader_id defending_admiral
dcon::leader_id attacking_admiral
dcon::province_id location
uint16_t defender_big_ships
uint16_t attacker_transport_ships
uint16_t attacker_transport_losses
element_type get_element_type() const
rotation get_rotation() const
union ui::element_data::internal_data data
dcon::gfx_object_id gfx_object
std::unique_ptr< element_base > root
element_base * naval_combat_window
element_base * province_window
element_base * under_mouse