summaryrefslogtreecommitdiffhomepage
path: root/Stars45/AwardShowDlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/AwardShowDlg.cpp')
-rw-r--r--Stars45/AwardShowDlg.cpp144
1 files changed, 72 insertions, 72 deletions
diff --git a/Stars45/AwardShowDlg.cpp b/Stars45/AwardShowDlg.cpp
index 8ba188c..1de3c59 100644
--- a/Stars45/AwardShowDlg.cpp
+++ b/Stars45/AwardShowDlg.cpp
@@ -1,15 +1,15 @@
/* Project Starshatter 4.5
- Destroyer Studios LLC
- Copyright © 1997-2004. All Rights Reserved.
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
- SUBSYSTEM: Stars.exe
- FILE: AwardShowDlg.cpp
- AUTHOR: John DiCamillo
+ SUBSYSTEM: Stars.exe
+ FILE: AwardShowDlg.cpp
+ AUTHOR: John DiCamillo
- OVERVIEW
- ========
- Main Menu Dialog Active Window class
+ OVERVIEW
+ ========
+ Main Menu Dialog Active Window class
*/
#include "MemDebug.h"
@@ -39,11 +39,11 @@ DEF_MAP_CLIENT(AwardShowDlg, OnClose);
// +--------------------------------------------------------------------+
AwardShowDlg::AwardShowDlg(Screen* s, FormDef& def, MenuScreen* mgr)
- : FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
- lbl_name(0), lbl_info(0), img_rank(0), btn_close(0), exit_latch(true),
- rank(-1), medal(-1)
+: FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
+lbl_name(0), lbl_info(0), img_rank(0), btn_close(0), exit_latch(true),
+rank(-1), medal(-1)
{
- Init(def);
+ Init(def);
}
AwardShowDlg::~AwardShowDlg()
@@ -55,12 +55,12 @@ AwardShowDlg::~AwardShowDlg()
void
AwardShowDlg::RegisterControls()
{
- lbl_name = FindControl(203);
- lbl_info = FindControl(201);
- img_rank = (ImageBox*) FindControl(202);
+ lbl_name = FindControl(203);
+ lbl_info = FindControl(201);
+ img_rank = (ImageBox*) FindControl(202);
- btn_close = (Button*) FindControl(1);
- REGISTER_CLIENT(EID_CLICK, btn_close, AwardShowDlg, OnClose);
+ btn_close = (Button*) FindControl(1);
+ REGISTER_CLIENT(EID_CLICK, btn_close, AwardShowDlg, OnClose);
}
// +--------------------------------------------------------------------+
@@ -68,8 +68,8 @@ AwardShowDlg::RegisterControls()
void
AwardShowDlg::Show()
{
- FormWindow::Show();
- ShowAward();
+ FormWindow::Show();
+ ShowAward();
}
// +--------------------------------------------------------------------+
@@ -77,19 +77,19 @@ AwardShowDlg::Show()
void
AwardShowDlg::ExecFrame()
{
- if (Keyboard::KeyDown(VK_RETURN)) {
- if (!exit_latch)
- OnClose(0);
- }
-
- else if (Keyboard::KeyDown(VK_ESCAPE)) {
- if (!exit_latch)
- OnClose(0);
- }
-
- else {
- exit_latch = false;
- }
+ if (Keyboard::KeyDown(VK_RETURN)) {
+ if (!exit_latch)
+ OnClose(0);
+ }
+
+ else if (Keyboard::KeyDown(VK_ESCAPE)) {
+ if (!exit_latch)
+ OnClose(0);
+ }
+
+ else {
+ exit_latch = false;
+ }
}
// +--------------------------------------------------------------------+
@@ -97,15 +97,15 @@ AwardShowDlg::ExecFrame()
void
AwardShowDlg::SetRank(int r)
{
- rank = r;
- medal = -1;
+ rank = r;
+ medal = -1;
}
void
AwardShowDlg::SetMedal(int m)
{
- rank = -1;
- medal = m;
+ rank = -1;
+ medal = m;
}
// +--------------------------------------------------------------------+
@@ -113,41 +113,41 @@ AwardShowDlg::SetMedal(int m)
void
AwardShowDlg::ShowAward()
{
- if (rank >= 0) {
- if (lbl_name) {
- lbl_name->SetText(Text("Rank of ") + Player::RankName(rank));
- }
-
- if (lbl_info) {
- lbl_info->SetText(Player::RankDescription(rank));
- }
-
- if (img_rank) {
- img_rank->SetPicture(*Player::RankInsignia(rank, 1));
- img_rank->Show();
- }
- }
-
- else if (medal >= 0) {
- if (lbl_name) {
- lbl_name->SetText(Player::MedalName(medal));
- }
-
- if (lbl_info) {
- lbl_info->SetText(Player::MedalDescription(medal));
- }
-
- if (img_rank) {
- img_rank->SetPicture(*Player::MedalInsignia(medal, 1));
- img_rank->Show();
- }
- }
-
- else {
- if (lbl_name) lbl_name->SetText("");
- if (lbl_info) lbl_info->SetText("");
- if (img_rank) img_rank->Hide();
- }
+ if (rank >= 0) {
+ if (lbl_name) {
+ lbl_name->SetText(Text("Rank of ") + Player::RankName(rank));
+ }
+
+ if (lbl_info) {
+ lbl_info->SetText(Player::RankDescription(rank));
+ }
+
+ if (img_rank) {
+ img_rank->SetPicture(*Player::RankInsignia(rank, 1));
+ img_rank->Show();
+ }
+ }
+
+ else if (medal >= 0) {
+ if (lbl_name) {
+ lbl_name->SetText(Player::MedalName(medal));
+ }
+
+ if (lbl_info) {
+ lbl_info->SetText(Player::MedalDescription(medal));
+ }
+
+ if (img_rank) {
+ img_rank->SetPicture(*Player::MedalInsignia(medal, 1));
+ img_rank->Show();
+ }
+ }
+
+ else {
+ if (lbl_name) lbl_name->SetText("");
+ if (lbl_info) lbl_info->SetText("");
+ if (img_rank) img_rank->Hide();
+ }
}
// +--------------------------------------------------------------------+
@@ -155,5 +155,5 @@ AwardShowDlg::ShowAward()
void
AwardShowDlg::OnClose(AWEvent* event)
{
- manager->ShowPlayerDlg();
+ manager->ShowPlayerDlg();
}