Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
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
33
CmdMsgDlg::CmdMsgDlg
(
Screen
* s,
FormDef
& def,
CmpnScreen
* mgr)
34
:
FormWindow
(s, 0, 0, s->Width(), s->Height()), manager(mgr),
35
exit_latch(false)
36
{
37
Init
(def);
38
}
39
40
CmdMsgDlg::~CmdMsgDlg
()
41
{
42
}
43
44
void
45
CmdMsgDlg::RegisterControls
()
46
{
47
title
=
FindControl
(100);
48
message
=
FindControl
(101);
49
50
apply
= (
Button
*)
FindControl
(1);
51
REGISTER_CLIENT
(
EID_CLICK
,
apply
,
CmdMsgDlg
,
OnApply
);
52
}
53
54
// +--------------------------------------------------------------------+
55
56
void
57
CmdMsgDlg::ExecFrame
()
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
77
CmdMsgDlg::Show
()
78
{
79
FormWindow::Show
();
80
SetFocus
();
81
}
82
83
// +--------------------------------------------------------------------+
84
85
void
86
CmdMsgDlg::OnApply
(
AWEvent
* event)
87
{
88
if
(
manager
)
89
manager
->
CloseTopmost
();
90
}
91
92
// +--------------------------------------------------------------------+
Stars45
CmdMsgDlg.cpp
Generated on Tue Jun 5 2012 20:46:48 for Starshatter_Open by
1.8.1