Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CmdMsgDlg.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: CmdMsgDlg.cpp
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12 */
13 
14 #include "MemDebug.h"
15 #include "CmdMsgDlg.h"
16 #include "CmpnScreen.h"
17 #include "Starshatter.h"
18 
19 #include "Game.h"
20 #include "ListBox.h"
21 #include "ComboBox.h"
22 #include "Button.h"
23 #include "Keyboard.h"
24 #include "FormatUtil.h"
25 
26 // +--------------------------------------------------------------------+
27 // DECLARE MAPPING FUNCTIONS:
28 
29 DEF_MAP_CLIENT(CmdMsgDlg, OnApply);
30 
31 // +--------------------------------------------------------------------+
32 
34 : FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
35 exit_latch(false)
36 {
37  Init(def);
38 }
39 
41 {
42 }
43 
44 void
46 {
47  title = FindControl(100);
48  message = FindControl(101);
49 
50  apply = (Button*) FindControl(1);
52 }
53 
54 // +--------------------------------------------------------------------+
55 
56 void
58 {
59  if (Keyboard::KeyDown(VK_RETURN)) {
60  OnApply(0);
61  }
62 
63  if (Keyboard::KeyDown(VK_ESCAPE)) {
64  if (!exit_latch)
65  OnApply(0);
66 
67  exit_latch = true;
68  }
69  else {
70  exit_latch = false;
71  }
72 }
73 
74 // +--------------------------------------------------------------------+
75 
76 void
78 {
80  SetFocus();
81 }
82 
83 // +--------------------------------------------------------------------+
84 
85 void
87 {
88  if (manager)
90 }
91 
92 // +--------------------------------------------------------------------+