48 static Menu* fighter_menu = 0;
49 static Menu* starship_menu = 0;
50 static Menu* target_menu = 0;
51 static Menu* combat_menu = 0;
52 static Menu* formation_menu = 0;
53 static Menu* sensors_menu = 0;
54 static Menu* mission_menu = 0;
55 static Menu* wing_menu = 0;
56 static Menu* elem_menu = 0;
57 static Menu* control_menu = 0;
59 static int starship_page = 0;
60 static int num_pages = 0;
68 static int initialized = 0;
69 if (initialized)
return;
71 target_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.TARGET"));
76 combat_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.COMBAT"));
81 formation_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.FORMATION"));
87 sensors_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.SENSORS"));
93 mission_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.MISSION"));
105 elem_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.ELEMENT"));
112 control_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.CONTROL"));
118 fighter_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.RADIO"));
123 starship_menu =
new(__FILE__,__LINE__)
Menu(
Game::GetText(
"RadioView.menu.RADIO"));
134 delete starship_menu;
137 delete formation_menu;
145 static bool TargetRequired(
const MenuItem* item)
155 if (item->
GetData() == (DWORD) target_menu)
169 :
View(c), sim(0), ship(0), font(0), dst_elem(0)
184 for (
int i = 0; i <
MAX_MSG; i++)
278 int message_queue_empty =
true;
281 for (
int i = 0; i <
MAX_MSG; i++) {
290 message_queue_empty =
false;
294 if (!message_queue_empty) {
296 for (
int i = 0; i <
MAX_MSG; i++) {
298 for (
int j = 0; j < MAX_MSG-1; j++) {
308 bool hud_off =
false;
315 for (
int i = 0; i <
MAX_MSG; i++) {
337 case 1: chat =
"ALL: ";
break;
338 case 2: chat =
"TEAM: ";
break;
339 case 3: chat =
"WING: ";
break;
340 case 4: chat =
"UNIT: ";
break;
358 if (!ship || !item)
return;
366 if (TargetRequired(item))
378 case 1: wing = 2;
break;
379 case 2: wing = 1;
break;
380 case 3: wing = 4;
break;
381 case 4: wing = 3;
break;
389 if (TargetRequired(item))
400 if (TargetRequired(item))
432 static int current_key = 0;
445 if (++starship_page >= num_pages)
452 for (
int i = 0; i < max_items; i++) {
454 current_key =
'1' + i;
512 for (
int i = 0; i < 10; i++) {
543 int page_offset = starship_page*
PAGE_SIZE;
547 if (num_pages == 0) {
556 num_pages = (n/
PAGE_SIZE) + (n%PAGE_SIZE > 0);
566 if (n >= page_offset && n < page_offset+PAGE_SIZE) {
568 sprintf_s(text,
"%d. %s", n+1 - page_offset, (
const char*) elem->
Name());
571 starship_menu->
AddMenu(text, elem_menu, (DWORD) elem.
value());
575 strcat_s(text,
Game::GetText(
"RadioView.item.not-avail").data());
576 starship_menu->
AddItem(text, 0,
false);
585 sprintf_s(text,
Game::GetText(
"RadioView.item.next-page").data(), starship_page + 1, num_pages);
589 return starship_menu;
609 for (
int i = 0; i <
MAX_MSG; i++) {
618 for (
int i = 0; i < MAX_MSG-1; i++) {
635 for (
int i = 0; i <
MAX_MSG-1; i++) {