Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
LoadDlg.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: LoadDlg.cpp
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Loading progress dialog box
13
*/
14
15
16
#include "
MemDebug.h
"
17
#include "
LoadDlg.h
"
18
#include "
Starshatter.h
"
19
20
#include "
Game.h
"
21
#include "
DataLoader.h
"
22
#include "
Video.h
"
23
#include "
Keyboard.h
"
24
#include "
Mouse.h
"
25
#include "
ListBox.h
"
26
#include "
ComboBox.h
"
27
#include "
Slider.h
"
28
#include "
FormatUtil.h
"
29
30
// +--------------------------------------------------------------------+
31
32
LoadDlg::LoadDlg
(
Screen
* s,
FormDef
& def)
33
:
FormWindow
(s, 0, 0, s->Width(), s->Height()),
34
progress(0), activity(0)
35
{
36
Init
(def);
37
}
38
39
LoadDlg::~LoadDlg
()
40
{
41
}
42
43
void
44
LoadDlg::RegisterControls
()
45
{
46
title
=
FindControl
(100);
47
activity
=
FindControl
(101);
48
progress
= (
Slider
*)
FindControl
(102);
49
}
50
51
// +--------------------------------------------------------------------+
52
53
void
54
LoadDlg::ExecFrame
()
55
{
56
Starshatter
* stars =
Starshatter::GetInstance
();
57
58
if
(stars) {
59
if
(
title
) {
60
if
(stars->
GetGameMode
() ==
Starshatter::CLOD_MODE
||
61
stars->
GetGameMode
() ==
Starshatter::CMPN_MODE
)
62
title
->
SetText
(
Game::GetText
(
"LoadDlg.campaign"
));
63
64
else
if
(stars->
GetGameMode
() ==
Starshatter::MENU_MODE
)
65
title
->
SetText
(
Game::GetText
(
"LoadDlg.tac-ref"
));
66
67
else
68
title
->
SetText
(
Game::GetText
(
"LoadDlg.mission"
));
69
}
70
71
activity
->
SetText
(stars->
GetLoadActivity
());
72
progress
->
SetValue
(stars->
GetLoadProgress
());
73
}
74
}
75
76
// +--------------------------------------------------------------------+
77
Stars45
LoadDlg.cpp
Generated on Tue Jun 5 2012 20:46:55 for Starshatter_Open by
1.8.1