62 static bool mouse_active =
false;
67 : screen(0), gamewin(0),
68 navdlg(0), wep_view(0), engdlg(0), fltdlg(0),
69 HUDfont(0), GUIfont(0), GUI_small_font(0), title_font(0), cam_view(0),
70 isShown(false), disp_view(0), hud_view(0), tac_view(0), radio_view(0),
71 quantum_view(0), quit_view(0), ctldlg(0), joydlg(0), keydlg(0), auddlg(0),
72 viddlg(0), moddlg(0), modInfoDlg(0),
73 flare1(0), flare2(0), flare3(0), flare4(0),
74 optdlg(0), cam_dir(0), sim(0)
114 gamewin =
new(__FILE__,__LINE__)
Window(screen, 0, 0, screen->
Width(), screen->
Height());
128 hud_view =
new(__FILE__,__LINE__)
HUDView(gamewin);
131 wep_view =
new(__FILE__,__LINE__)
WepView(gamewin);
134 quantum_view =
new(__FILE__,__LINE__)
QuantumView(gamewin);
135 gamewin->
AddView(quantum_view);
137 radio_view =
new(__FILE__,__LINE__)
RadioView(gamewin);
140 tac_view =
new(__FILE__,__LINE__)
TacticalView(gamewin,
this);
147 quit_view =
new(__FILE__,__LINE__)
QuitView(gamewin);
159 else if (stars->
Corona()) {
167 aud_def.
Load(
"AudDlg");
168 auddlg =
new(__FILE__,__LINE__)
AudDlg(screen, aud_def,
this);
171 ctl_def.
Load(
"CtlDlg");
172 ctldlg =
new(__FILE__,__LINE__)
CtlDlg(screen, ctl_def,
this);
175 opt_def.
Load(
"OptDlg");
176 optdlg =
new(__FILE__,__LINE__)
OptDlg(screen, opt_def,
this);
179 vid_def.
Load(
"VidDlg");
180 viddlg =
new(__FILE__,__LINE__)
VidDlg(screen, vid_def,
this);
183 mod_def.
Load(
"ModDlg");
184 moddlg =
new(__FILE__,__LINE__)
ModDlg(screen, mod_def,
this);
187 joy_def.
Load(
"JoyDlg");
188 joydlg =
new(__FILE__,__LINE__)
JoyDlg(screen, joy_def,
this);
191 key_def.
Load(
"KeyDlg");
192 keydlg =
new(__FILE__,__LINE__)
KeyDlg(screen, key_def,
this);
194 FormDef mod_info_def(
"ModInfoDlg", 0);
195 mod_info_def.
Load(
"ModInfoDlg");
196 modInfoDlg =
new(__FILE__,__LINE__)
ModInfoDlg(screen, mod_info_def,
this);
199 nav_def.
Load(
"NavDlg");
200 navdlg =
new(__FILE__,__LINE__)
NavDlg(screen, nav_def,
this);
203 eng_def.
Load(
"EngDlg");
204 engdlg =
new(__FILE__,__LINE__)
EngDlg(screen, eng_def,
this);
207 flt_def.
Load(
"FltDlg");
208 fltdlg =
new(__FILE__,__LINE__)
FltDlg(screen, flt_def,
this);
210 if (engdlg) engdlg->
Hide();
211 if (fltdlg) fltdlg->
Hide();
212 if (navdlg) navdlg->
Hide();
213 if (auddlg) auddlg->
Hide();
214 if (viddlg) viddlg->
Hide();
215 if (optdlg) optdlg->
Hide();
216 if (ctldlg) ctldlg->
Hide();
217 if (keydlg) keydlg->
Hide();
218 if (joydlg) joydlg->
Hide();
219 if (moddlg) moddlg->
Hide();
220 if (modInfoDlg) modInfoDlg->
Hide();
234 if (gamewin && disp_view)
314 case 0:
return flare1;
315 case 1:
return flare2;
316 case 2:
return flare3;
317 case 3:
return flare4;
337 bool dialog_showing =
false;
346 dialog_showing =
true;
349 if (navdlg && navdlg->
IsShown()) {
352 dialog_showing =
true;
355 if (engdlg && engdlg->
IsShown()) {
358 dialog_showing =
true;
361 if (fltdlg && fltdlg->
IsShown()) {
364 dialog_showing =
true;
367 if (auddlg && auddlg->
IsShown()) {
369 dialog_showing =
true;
372 if (viddlg && viddlg->
IsShown()) {
374 dialog_showing =
true;
377 if (optdlg && optdlg->
IsShown()) {
379 dialog_showing =
true;
382 if (ctldlg && ctldlg->
IsShown()) {
384 dialog_showing =
true;
387 if (keydlg && keydlg->
IsShown()) {
389 dialog_showing =
true;
392 if (joydlg && joydlg->
IsShown()) {
394 dialog_showing =
true;
397 if (moddlg && moddlg->
IsShown()) {
399 dialog_showing =
true;
402 if (quantum_view && !dialog_showing) {
406 if (radio_view && !dialog_showing) {
410 if (wep_view && !dialog_showing) {
414 if (tac_view && !dialog_showing) {
434 else if (stars->
Corona()) {
480 bool processed =
false;
482 if (!gamewin)
return processed;
484 if (navdlg && navdlg->
IsShown()) {
489 else if (engdlg && engdlg->
IsShown()) {
494 else if (fltdlg && fltdlg->
IsShown()) {
499 else if (modInfoDlg && modInfoDlg->
IsShown()) {
504 else if (keydlg && keydlg->
IsShown()) {
509 else if (joydlg && joydlg->
IsShown()) {
514 else if (auddlg && auddlg->
IsShown()) {
519 else if (viddlg && viddlg->
IsShown()) {
524 else if (optdlg && optdlg->
IsShown()) {
529 else if (moddlg && moddlg->
IsShown()) {
534 else if (ctldlg && ctldlg->
IsShown()) {
539 else if (quantum_view && quantum_view->
IsMenuShown()) {
549 else if (radio_view && radio_view->
IsMenuShown()) {
557 static Window* old_disp_win = 0;
581 if (disp_view && gamewin) {
586 if (engdlg) engdlg->
SetShip(0);
587 if (fltdlg) fltdlg->
SetShip(0);
588 if (navdlg) navdlg->
SetShip(0);
602 bool form_shown =
false;
604 if (navdlg && navdlg->
IsShown())
607 else if (engdlg && engdlg->
IsShown())
610 else if (fltdlg && fltdlg->
IsShown())
613 else if (auddlg && auddlg->
IsShown())
616 else if (viddlg && viddlg->
IsShown())
619 else if (optdlg && optdlg->
IsShown())
622 else if (moddlg && moddlg->
IsShown())
625 else if (ctldlg && ctldlg->
IsShown())
628 else if (keydlg && keydlg->
IsShown())
631 else if (joydlg && joydlg->
IsShown())
642 if (!gamewin)
return;
644 if ((navdlg && navdlg->
IsShown()) ||
645 (engdlg && engdlg->
IsShown()) ||
646 (fltdlg && fltdlg->
IsShown()) ||
647 (auddlg && auddlg->
IsShown()) ||
648 (viddlg && viddlg->
IsShown()) ||
649 (optdlg && optdlg->
IsShown()) ||
650 (moddlg && moddlg->
IsShown()) ||
651 (ctldlg && ctldlg->
IsShown()) ||
652 (keydlg && keydlg->
IsShown()) ||
665 if (!gamewin)
return;
667 if (navdlg && !navdlg->
IsShown()) {
675 mouse_active = mouse_con->
Active();
691 if (!gamewin)
return;
693 if (navdlg && navdlg->
IsShown()) {
709 return gamewin && navdlg && navdlg->
IsShown();
717 if (!gamewin)
return;
719 if (engdlg && !engdlg->
IsShown()) {
726 mouse_active = mouse_con->
Active();
742 if (!gamewin)
return;
744 if (engdlg && engdlg->
IsShown()) {
760 return gamewin && engdlg && engdlg->
IsShown();
768 if (!gamewin)
return;
770 if (fltdlg && !fltdlg->
IsShown()) {
777 mouse_active = mouse_con->
Active();
793 if (!gamewin)
return;
795 if (fltdlg && fltdlg->
IsShown()) {
811 return gamewin && fltdlg && fltdlg->
IsShown();
831 mouse_active = mouse_con->
Active();
844 if (auddlg && auddlg->
IsShown()) {
859 return auddlg && auddlg->
IsShown();
879 mouse_active = mouse_con->
Active();
892 if (viddlg && viddlg->
IsShown()) {
907 return viddlg && viddlg->
IsShown();
927 mouse_active = mouse_con->
Active();
940 if (optdlg && optdlg->
IsShown()) {
955 return optdlg && optdlg->
IsShown();
975 mouse_active = mouse_con->
Active();
988 if (moddlg && moddlg->
IsShown()) {
1003 return moddlg && moddlg->
IsShown();
1011 if (moddlg && modInfoDlg) {
1026 mouse_active = mouse_con->
Active();
1047 return modInfoDlg && modInfoDlg->
IsShown();
1067 mouse_active = mouse_con->
Active();
1080 if (ctldlg && ctldlg->
IsShown()) {
1095 return ctldlg && ctldlg->
IsShown();
1116 if (keydlg) keydlg->
Show();
1131 return keydlg && keydlg->
IsShown();
1152 if (joydlg) joydlg->
Show();
1167 return joydlg && joydlg->
IsShown();
1189 GameScreen::HideAll()
1193 if (engdlg) engdlg->
Hide();
1194 if (fltdlg) fltdlg->
Hide();
1195 if (navdlg) navdlg->
Hide();
1196 if (auddlg) auddlg->
Hide();
1197 if (viddlg) viddlg->
Hide();
1198 if (optdlg) optdlg->
Hide();
1199 if (moddlg) moddlg->
Hide();
1200 if (modInfoDlg) modInfoDlg->
Hide();
1201 if (ctldlg) ctldlg->
Hide();
1202 if (keydlg) keydlg->
Hide();
1203 if (joydlg) joydlg->
Hide();
1211 if (ctldlg) ctldlg->
Apply();
1212 if (optdlg) optdlg->
Apply();
1213 if (auddlg) auddlg->
Apply();
1214 if (viddlg) viddlg->
Apply();
1216 if (engdlg) engdlg->
Hide();
1217 if (fltdlg) fltdlg->
Hide();
1218 if (navdlg) navdlg->
Hide();
1219 if (ctldlg) ctldlg->
Hide();
1220 if (auddlg) auddlg->
Hide();
1221 if (viddlg) viddlg->
Hide();
1222 if (optdlg) optdlg->
Hide();
1223 if (moddlg) moddlg->
Hide();
1224 if (keydlg) keydlg->
Hide();
1225 if (joydlg) joydlg->
Hide();
1235 if (ctldlg) ctldlg->
Cancel();
1236 if (optdlg) optdlg->
Cancel();
1237 if (auddlg) auddlg->
Cancel();
1238 if (viddlg) viddlg->
Cancel();
1240 if (engdlg) engdlg->
Hide();
1241 if (fltdlg) fltdlg->
Hide();
1242 if (navdlg) navdlg->
Hide();
1243 if (ctldlg) ctldlg->
Hide();
1244 if (auddlg) auddlg->
Hide();
1245 if (viddlg) viddlg->
Hide();
1246 if (optdlg) optdlg->
Hide();
1247 if (moddlg) moddlg->
Hide();
1248 if (keydlg) keydlg->
Hide();
1249 if (joydlg) joydlg->
Hide();