Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CmdOrdersDlg.cpp
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: CmdOrdersDlg.cpp
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Operational Command Dialog (Campaign Orders Tab)
13 */
14 
15 #include "MemDebug.h"
16 #include "CmdOrdersDlg.h"
17 #include "CmdDlg.h"
18 #include "CmpnScreen.h"
19 #include "Starshatter.h"
20 #include "Campaign.h"
21 #include "Combatant.h"
22 #include "CombatGroup.h"
23 #include "CombatUnit.h"
24 #include "ShipDesign.h"
25 
26 #include "Game.h"
27 #include "DataLoader.h"
28 #include "Button.h"
29 #include "ComboBox.h"
30 #include "ListBox.h"
31 #include "Slider.h"
32 #include "Video.h"
33 #include "Keyboard.h"
34 #include "Mouse.h"
35 #include "ParseUtil.h"
36 #include "FormatUtil.h"
37 
38 // +--------------------------------------------------------------------+
39 // DECLARE MAPPING FUNCTIONS:
40 
44 
45 // +--------------------------------------------------------------------+
46 
48 : FormWindow(s, 0, 0, s->Width(), s->Height()), CmdDlg(mgr), manager(mgr),
49 lbl_orders(0), stars(0), campaign(0)
50 {
53 
54  Init(def);
55 }
56 
58 {
59 }
60 
61 // +--------------------------------------------------------------------+
62 
63 void
65 {
66  lbl_orders = FindControl(400);
67 
68  RegisterCmdControls(this);
69 
70  if (btn_save)
72 
73  if (btn_exit)
75 
76  for (int i = 0; i < 5; i++) {
77  if (btn_mode[i])
79  }
80 }
81 
82 // +--------------------------------------------------------------------+
83 
84 void
86 {
87  mode = MODE_ORDERS;
88 
90  ShowCmdDlg();
91 
93 
94  if (campaign && lbl_orders) {
95  Text orders("<font Limerick12><color ffff80>");
96  orders += Game::GetText("CmdOrdersDlg.situation");
97  orders += "\n<font Verdana><color ffffff>";
98  if (*campaign->Situation())
99  orders += campaign->Situation();
100  else
101  orders += campaign->Description();
102 
103  orders += "\n\n<font Limerick12><color ffff80>";
104  orders += Game::GetText("CmdOrdersDlg.orders");
105  orders += "\n<font Verdana><color ffffff>";
106  orders += campaign->Orders();
107 
108  lbl_orders->SetText(orders);
109  }
110 }
111 
112 // +--------------------------------------------------------------------+
113 
114 void
116 {
118 }
119 
120 // +--------------------------------------------------------------------+
121 
122 void
124 {
125  CmdDlg::OnSave(event);
126 }
127 
128 void
130 {
131  CmdDlg::OnExit(event);
132 }
133 
134 void
136 {
137  CmdDlg::OnMode(event);
138 }
139