8
8
// SS SS tt ee ll ll aa aa
9
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
11
// Copyright (c) 1995-2010 by Bradford W. Mott, Stephen Anthony
12
// and the Stella Team
13
// See the file "license" for information on usage and redistribution of
14
// See the file "License.txt" for information on usage and redistribution of
14
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
// $Id: AboutDialog.cxx,v 1.24 2008/03/23 16:22:45 stephena Exp $
17
// $Id: AboutDialog.cxx 2001 2010-04-10 21:37:23Z stephena $
18
19
// Based on code from ScummVM - Scumm Interpreter
19
20
// Copyright (C) 2002-2004 The ScummVM project
27
28
#include "AboutDialog.hxx"
29
#define ADD_ATEXT(d) do { dsc[i] = d; i++; } while(0)
30
#define ADD_ALINE ADD_ATEXT("")
32
30
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
33
31
AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent,
34
const GUI::Font& font, int x, int y, int w, int h)
35
: Dialog(osystem, parent, x, y, w, h),
32
const GUI::Font& font)
33
: Dialog(osystem, parent, 0, 0, 0, 0),
37
const int lineHeight = font.getLineHeight(),
38
fontWidth = font.getMaxCharWidth(),
39
fontHeight = font.getFontHeight(),
40
buttonWidth = font.getStringWidth("Defaults") + 20,
41
buttonHeight = font.getLineHeight() + 4;
45
// Set real dimensions
46
_w = 52 * fontWidth + 8;
47
_h = 11 * lineHeight + 20;
41
49
// Add Previous, Next and Close buttons
42
myPrevButton = addButton(font, 10, h - 24, "Previous", kPrevCmd);
50
xpos = 10; ypos = _h - buttonHeight - 10;
52
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
53
"Previous", kPrevCmd);
43
54
myPrevButton->clearFlags(WIDGET_ENABLED);
44
55
wid.push_back(myPrevButton);
46
myNextButton = addButton(font, (kButtonWidth + 15), h - 24,
57
xpos += buttonWidth + 7;
59
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
48
61
wid.push_back(myNextButton);
50
ButtonWidget* b = addButton(font, w - (kButtonWidth + 10), h - 24,
63
xpos = _w - buttonWidth - 10;
65
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
53
68
addOKWidget(b); addCancelWidget(b);
55
myTitle = new StaticTextWidget(this, font, 5, 5, w - 10, font.getFontHeight(),
71
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,
56
72
"", kTextAlignCenter);
57
73
myTitle->setTextColor(kTextColorEm);
59
for(int i = 0; i < LINES_PER_PAGE; i++)
75
xpos = 10; ypos += lineHeight + 4;
76
for(int i = 0; i < kLINES_PER_PAGE; i++)
61
myDesc[i] = new StaticTextWidget(this, font, 10, 18 + (10 * i), w - 20,
62
font.getFontHeight(), "", kTextAlignLeft);
78
myDesc[i] = new StaticTextWidget(this, font, xpos, ypos, _w - 20,
79
fontHeight, "", kTextAlignLeft);
65
83
addToFocusList(wid);
103
title = "The Stella team";
123
title = "The Stella Team";
104
124
ADD_ATEXT("\\L\\c0"" Bradford W. Mott");
105
ADD_ATEXT("\\L\\c2"" Original author, lead developer");
125
ADD_ATEXT("\\L\\c2"" Original author");
106
126
ADD_ATEXT("\\L\\c0"" Stephen Anthony");
107
ADD_ATEXT("\\L\\c2"" Lead developer, Linux/Win32 maintainer");
127
ADD_ATEXT("\\L\\c2"" Lead developer, Linux/MacOS X/Win32 maintainer");
108
128
ADD_ATEXT("\\L\\c0"" Mark Grebe");
109
ADD_ATEXT("\\L\\c2"" Author/maintainer for OSX port");
129
ADD_ATEXT("\\L\\c2"" Original author for MacOS X port");
110
130
ADD_ATEXT("\\L\\c0"" Brian Watson");
111
131
ADD_ATEXT("\\L\\c2"" Emulation core enhancement, debugger support");
135
title = "The Stella Team";
112
136
ADD_ATEXT("\\L\\c0"" Eckhard Stolberg");
113
137
ADD_ATEXT("\\L\\c2"" Emulation core development");
117
title = "The Stella team";
118
ADD_ATEXT("\\L\\c0"" Joe D'Andrea");
119
ADD_ATEXT("\\L\\c2"" Maintainer for Solaris port");
120
ADD_ATEXT("\\L\\c0"" Darrell Spice Jr. & Doodle");
121
ADD_ATEXT("\\L\\c2"" Authors for OS/2 port");
122
138
ADD_ATEXT("\\L\\c0"" Kostas Nakos");
123
139
ADD_ATEXT("\\L\\c2"" Author/maintainer for WinCE port");
124
ADD_ATEXT("\\L\\c0"" Alex Zaballa");
125
ADD_ATEXT("\\L\\c2"" Maintainer for GP2X port");
129
title = "Retired members / Contributors";
130
ADD_ATEXT("\\L\\c0""See Stella manual for contribution details");
132
ADD_ATEXT("\\L\\c0"" David Aspell, Chris Bennett, Alexander Bilstein");
133
ADD_ATEXT("\\L\\c0"" Dan Boris, Piero Cavina, Bob Colbert");
134
ADD_ATEXT("\\L\\c0"" Renato Ferreira, Ron Fries, Aaron Giles");
135
ADD_ATEXT("\\L\\c0"" Mark Hahn, Kevin Horton, Thomas Jentzsch");
136
ADD_ATEXT("\\L\\c0"" Erik \"Voch\" Kovach, Daniel Marks, James Mcclain");
137
ADD_ATEXT("\\L\\c0"" David McEwen, Jeff Miller, Dan Mowczan");
138
ADD_ATEXT("\\L\\c0"" Jack Nutting, Manuel Polik, Jim Pragit");
139
ADD_ATEXT("\\L\\c0"" John Saeger, Chris Salomon, Jason Scott");
143
title = "Contributors";
144
ADD_ATEXT("\\L\\c0"" See Stella manual for contribution details");
145
ADD_ATEXT("\\L\\c0"" and for many other people not listed here");
147
ADD_ATEXT("\\L\\c0"" Thanks to the ScummVM project for the GUI code");
149
ADD_ATEXT("\\L\\c0"" Thanks to Ian Bogost and the Georgia Tech");
150
ADD_ATEXT("\\L\\c0"" Atari Team for the CRT Simulation effects");
143
title = "Retired members / Contributors";
144
ADD_ATEXT("\\L\\c0""See Stella manual for contribution details");
146
ADD_ATEXT("\\L\\c0"" David Shaw, Raul Silva, Chris Snell, John Stiles");
147
ADD_ATEXT("\\L\\c0"" Matthew Stroup, Joel Sutton, Greg Troutman");
148
ADD_ATEXT("\\L\\c0"" Curt Vendel, Keith Wilkins, Jeff Wisnia");
150
ADD_ATEXT("\\L\\c0""And many others ...");
152
ADD_ATEXT("\\L\\c0""Thanks to the ScummVM project for the GUI code");
156
154
title = "Cast of thousands";
157
155
ADD_ATEXT("\\L\\c0""Special thanks to AtariAge for introducing the");
158
156
ADD_ATEXT("\\L\\c0""Atari 2600 to a whole new generation");
171
169
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
172
170
void AboutDialog::displayInfo()
174
string titleStr, *dscStr;
176
updateStrings(myPage, LINES_PER_PAGE, titleStr, dscStr);
173
updateStrings(myPage, kLINES_PER_PAGE, titleStr);
178
175
myTitle->setLabel(titleStr);
179
for(int i = 0; i < LINES_PER_PAGE; i++)
176
for(int i = 0; i < kLINES_PER_PAGE; i++)
181
const char *str = dscStr[i].c_str();
178
const char* str = myDescStr[i].c_str();
182
179
TextAlignment align = kTextAlignCenter;
183
int color = kTextColor;
180
uInt32 color = kTextColor;
185
182
while (str[0] == '\\')