aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-30 21:11:48 +0000
committerEugene Sandulenko2005-07-30 21:11:48 +0000
commit6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch)
treec44c4e61f18ddd537f7082cb48869cf33d422fbd /gui
parent86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff)
downloadscummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'gui')
-rw-r--r--gui/Actions.cpp12
-rw-r--r--gui/Actions.h4
-rw-r--r--gui/EditTextWidget.cpp2
-rw-r--r--gui/EditTextWidget.h2
-rw-r--r--gui/KeysDialog.cpp2
-rw-r--r--gui/ListWidget.cpp14
-rw-r--r--gui/ListWidget.h8
-rw-r--r--gui/PopUpWidget.cpp12
-rw-r--r--gui/PopUpWidget.h4
-rw-r--r--gui/ScrollBarWidget.h2
-rw-r--r--gui/TabWidget.cpp6
-rw-r--r--gui/about.cpp18
-rw-r--r--gui/about.h4
-rw-r--r--gui/browser.cpp20
-rw-r--r--gui/chooser.cpp2
-rw-r--r--gui/console.h10
-rw-r--r--gui/dialog.h4
-rw-r--r--gui/editable.cpp4
-rw-r--r--gui/editable.h2
-rw-r--r--gui/launcher.cpp38
-rw-r--r--gui/launcher.h4
-rw-r--r--gui/message.cpp8
-rw-r--r--gui/newgui.cpp12
-rw-r--r--gui/newgui.h4
-rw-r--r--gui/options.cpp28
-rw-r--r--gui/widget.cpp8
-rw-r--r--gui/widget.h6
27 files changed, 120 insertions, 120 deletions
diff --git a/gui/Actions.cpp b/gui/Actions.cpp
index 58f96e7bbb..fcd7ee6a74 100644
--- a/gui/Actions.cpp
+++ b/gui/Actions.cpp
@@ -34,8 +34,8 @@
namespace GUI {
-Actions* Actions::Instance() {
- return _instance;
+Actions* Actions::Instance() {
+ return _instance;
}
Actions::Actions(GameDetector &detector) :
@@ -91,9 +91,9 @@ bool Actions::mappingActive() {
bool Actions::performMapped(unsigned int keyCode, bool pushed) {
int i;
-
+
for (i=0; i<size(); i++) {
- if (_action_mapping[i] == keyCode && _action_enabled[i])
+ if (_action_mapping[i] == keyCode && _action_enabled[i])
return perform((ActionType)i, pushed);
}
@@ -159,11 +159,11 @@ Key& Actions::getKeyAction(ActionType action)
return _key_action[action];
}
-// Game detector
+// Game detector
GameDetector& Actions::gameDetector(){
return *_detector;
}
Actions *Actions::_instance = NULL;
-
+
} // namespace GUI
diff --git a/gui/Actions.h b/gui/Actions.h
index 235312fe2c..d0df6ddbb7 100644
--- a/gui/Actions.h
+++ b/gui/Actions.h
@@ -28,7 +28,7 @@
#include "base/gameDetector.h"
#include "gui/Key.h"
namespace GUI {
-
+
#define MAX_ACTIONS 20
typedef int ActionType;
@@ -65,7 +65,7 @@ public:
virtual ~Actions();
- // Game detector
+ // Game detector
GameDetector& gameDetector();
protected:
Actions(GameDetector &detector);
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp
index f69edafb47..eeecd4c557 100644
--- a/gui/EditTextWidget.cpp
+++ b/gui/EditTextWidget.cpp
@@ -72,7 +72,7 @@ void EditTextWidget::drawWidget(bool hilite) {
Common::Rect EditTextWidget::getEditRect() const {
Common::Rect r(2, 1, _w - 2, _h);
-
+
return r;
}
diff --git a/gui/EditTextWidget.h b/gui/EditTextWidget.h
index ae2225c4de..ca8f7e14a9 100644
--- a/gui/EditTextWidget.h
+++ b/gui/EditTextWidget.h
@@ -46,7 +46,7 @@ protected:
void drawWidget(bool hilite);
void receivedFocusWidget();
void lostFocusWidget();
-
+
void startEditMode();
void endEditMode();
void abortEditMode();
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index 04e6d26f6b..290584e695 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -70,7 +70,7 @@ KeysDialog::KeysDialog(const Common::String &title)
// Get actions names
Common::StringList l;
- for (int i = 0; i < Actions::Instance()->size(); i++)
+ for (int i = 0; i < Actions::Instance()->size(); i++)
l.push_back(Actions::Instance()->actionName((ActionType)i));
_actionsList->setList(l);
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 6074d4f59a..faa70b3cec 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -28,13 +28,13 @@ namespace GUI {
ListWidget::ListWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws)
: EditableWidget(boss, x, y, w, h, ws), CommandSender(boss) {
-
+
if (ws == kBigWidgetSize) {
_w = w - kBigScrollBarWidth;
} else {
_w = w - kNormalScrollBarWidth;
}
-
+
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
_type = kListWidget;
_editMode = false;
@@ -45,7 +45,7 @@ ListWidget::ListWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize w
_scrollBar = new ScrollBarWidget(boss, _x + _w, _y, (ws == kBigWidgetSize ? kBigScrollBarWidth : kNormalScrollBarWidth), _h);
_scrollBar->setTarget(this);
_currentKeyDown = 0;
-
+
_quickSelectTime = 0;
// The item is selected, thus _bgcolor is used to draw the caret and _textcolorhi to erase it
@@ -129,7 +129,7 @@ void ListWidget::handleMouseDown(int x, int y, int button, int clickCount) {
_selectedItem = newSelectedItem;
sendCommand(kListSelectionChangedCmd, _selectedItem);
}
-
+
// TODO: Determine where inside the string the user clicked and place the
// caret accordingly. See _editScrollOffset and EditTextWidget::handleMouseDown.
draw();
@@ -182,7 +182,7 @@ bool ListWidget::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
_quickSelectStr += (char)ascii;
}
_quickSelectTime = time + 300; // TODO: Turn this into a proper constant (kQuickSelectDelay ?)
-
+
// FIXME: This is bad slow code (it scans the list linearly each time a
// key is pressed); it could be much faster. Only of importance if we have
@@ -331,7 +331,7 @@ void ListWidget::drawWidget(bool hilite) {
buffer = _editString;
adjustOffset();
deltax = -_editScrollOffset;
-
+
gui->drawString(buffer, _x + r.left, y, r.width(), textColor, kTextAlignLeft, deltax, false);
} else {
buffer = _list[pos];
@@ -353,7 +353,7 @@ Common::Rect ListWidget::getEditRect() const {
sprintf(temp, "%2d. ", (_list.size() - 1 + _numberingMode));
r.left += g_gui.getStringWidth(temp);
}
-
+
return r;
}
diff --git a/gui/ListWidget.h b/gui/ListWidget.h
index 93c97e4816..bdcbecc5fa 100644
--- a/gui/ListWidget.h
+++ b/gui/ListWidget.h
@@ -56,14 +56,14 @@ protected:
int _selectedItem;
ScrollBarWidget *_scrollBar;
int _currentKeyDown;
-
+
String _quickSelectStr;
uint32 _quickSelectTime;
public:
ListWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws = kDefaultWidgetSize);
virtual ~ListWidget();
-
+
void setList(const StringList& list);
const StringList& getList() const { return _list; }
int getSelected() const { return _selectedItem; }
@@ -73,7 +73,7 @@ public:
bool isEditable() const { return _editable; }
void setEditable(bool editable) { _editable = editable; }
void scrollTo(int item);
-
+
virtual void handleTickle();
virtual void handleMouseDown(int x, int y, int button, int clickCount);
virtual void handleMouseUp(int x, int y, int button, int clickCount);
@@ -95,7 +95,7 @@ protected:
void scrollBarRecalc();
void abortEditMode();
-
+
Common::Rect getEditRect() const;
void lostFocusWidget();
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp
index 757a432245..fb43902084 100644
--- a/gui/PopUpWidget.cpp
+++ b/gui/PopUpWidget.cpp
@@ -40,7 +40,7 @@ protected:
uint32 _openTime;
public:
PopUpDialog(PopUpWidget *boss, int clickX, int clickY, WidgetSize ws = kDefaultWidgetSize);
-
+
void drawDialog();
void handleMouseUp(int x, int y, int button, int clickCount);
@@ -50,11 +50,11 @@ public:
protected:
void drawMenuEntry(int entry, bool hilite);
-
+
int findItem(int x, int y) const;
void setSelection(int item);
bool isMouseDown();
-
+
void moveUp();
void moveDown();
};
@@ -71,7 +71,7 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY, WidgetSize w
_y = _popUpBoss->getAbsY() - _popUpBoss->_selectedItem * kLineHeight;
_h = _popUpBoss->_entries.size() * kLineHeight + 2;
_w = _popUpBoss->_w - kLineHeight + 2 - _popUpBoss->_labelWidth;
-
+
// Perform clipping / switch to scrolling mode if we don't fit on the screen
// FIXME - OSystem should send out notification messages when the screen
// resolution changes... we could generalize CommandReceiver and CommandSender.
@@ -112,7 +112,7 @@ void PopUpDialog::drawDialog() {
}
void PopUpDialog::handleMouseUp(int x, int y, int button, int clickCount) {
- // Mouse was released. If it wasn't moved much since the original mouse down,
+ // Mouse was released. If it wasn't moved much since the original mouse down,
// let the popup stay open. If it did move, assume the user made his selection.
int dist = (_clickX - x) * (_clickX - x) + (_clickY - y) * (_clickY - y);
if (dist > 3 * 3 || getMillis() - _openTime > 300) {
@@ -201,7 +201,7 @@ bool PopUpDialog::isMouseDown() {
// TODO/FIXME - need a way to determine whether any mouse buttons are pressed or not.
// Sure, we could just count mouse button up/down events, but that is cumbersome and
// error prone. Would be much nicer to add an API to OSystem for this...
-
+
return false;
}
diff --git a/gui/PopUpWidget.h b/gui/PopUpWidget.h
index d5623565e8..1aa9c90cbc 100644
--- a/gui/PopUpWidget.h
+++ b/gui/PopUpWidget.h
@@ -35,7 +35,7 @@ enum {
* Popup or dropdown widget which, when clicked, "pop up" a list of items and
* lets the user pick on of them.
*
- * Implementation wise, when the user selects an item, then a kPopUpItemSelectedCmd
+ * Implementation wise, when the user selects an item, then a kPopUpItemSelectedCmd
* is broadcast, with data being equal to the tag value of the selected entry.
*/
class PopUpWidget : public Widget, public CommandSender {
@@ -65,7 +65,7 @@ public:
/** Select the entry at the given index. */
void setSelected(int item);
-
+
/** Select the first entry matching the given tag. */
void setSelectedTag(uint32 tag);
diff --git a/gui/ScrollBarWidget.h b/gui/ScrollBarWidget.h
index 7eaaa1540e..ec62a7a2b5 100644
--- a/gui/ScrollBarWidget.h
+++ b/gui/ScrollBarWidget.h
@@ -46,7 +46,7 @@ protected:
kPageUpPart,
kPageDownPart
} Part;
-
+
Part _part;
int _sliderHeight;
int _sliderPos;
diff --git a/gui/TabWidget.cpp b/gui/TabWidget.cpp
index 681b2d6056..73fac2fde6 100644
--- a/gui/TabWidget.cpp
+++ b/gui/TabWidget.cpp
@@ -146,12 +146,12 @@ static void box(int x, int y, int width, int height, OverlayColor colorA, Overla
void TabWidget::drawWidget(bool hilite) {
NewGui *gui = &g_gui;
-
+
const int left1 = _x + 1;
const int right1 = _x + kTabLeftOffset + _activeTab * (_tabWidth + kTabSpacing);
const int left2 = right1 + _tabWidth;
const int right2 = _x + _w - 2;
-
+
// Draw horizontal line
gui->hLine(left1, _y + _tabHeight - 2, right1, gui->_shadowcolor);
gui->hLine(left2, _y + _tabHeight - 2, right2, gui->_shadowcolor);
@@ -160,7 +160,7 @@ void TabWidget::drawWidget(bool hilite) {
int i, x = _x + kTabLeftOffset;
for (i = 0; i < (int)_tabs.size(); ++i) {
OverlayColor color = (i == _activeTab) ? gui->_color : gui->_shadowcolor;
- int yOffset = (i == _activeTab) ? 0 : 2;
+ int yOffset = (i == _activeTab) ? 0 : 2;
box(x, _y + yOffset, _tabWidth, _tabHeight - yOffset, color, color, (i == _activeTab));
gui->drawString(_tabs[i].title, x + kTabPadding, _y + yOffset / 2 + (_tabHeight - gui->getFontHeight() - 3), _tabWidth - 2 * kTabPadding, gui->_textcolor, kTextAlignCenter);
x += _tabWidth + kTabSpacing;
diff --git a/gui/about.cpp b/gui/about.cpp
index ce7567fddf..14f29e3987 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -71,12 +71,12 @@ static const char *credits_intro[] = {
AboutDialog::AboutDialog()
: Dialog(10, 20, 300, 174),
_scrollPos(0), _scrollTime(0), _modifiers(0), _willClose(false) {
-
+
int i;
-
+
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
-
+
int outerBorder;
if (screenW >= 400 && screenH >= 300) {
@@ -91,7 +91,7 @@ AboutDialog::AboutDialog()
_w = screenW - 2 * outerBorder;
_h = screenH - 2 * outerBorder;
-
+
_lineHeight = g_gui.getFontHeight() + 3;
// Heuristic to compute 'optimal' dialog width
@@ -123,10 +123,10 @@ AboutDialog::AboutDialog()
addLine(features.c_str());
_lines.push_back("");
-
+
for (i = 0; i < ARRAYSIZE(credits_intro); i++)
addLine(credits_intro[i]);
-
+
for (i = 0; i < ARRAYSIZE(credits); i++)
addLine(credits[i]);
@@ -155,13 +155,13 @@ void AboutDialog::addLine(const char *str) {
break;
}
}
-
+
if (*str == 0) {
_lines.push_back(format);
} else {
Common::StringList wrappedLines;
g_gui.getFont().wordWrapText(str, _w - 2*xOff, wrappedLines);
-
+
for (Common::StringList::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
_lines.push_back(format + *i);
}
@@ -252,7 +252,7 @@ void AboutDialog::drawDialog() {
if (align == Graphics::kTextAlignCenter)
while (*str && *str == ' ')
str++;
-
+
g_gui.drawString(str, _x + xOff, y, _w - 2 * xOff, color, align, 0, false);
y += _lineHeight;
}
diff --git a/gui/about.h b/gui/about.h
index 58cfff8f15..573164fa22 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -37,9 +37,9 @@ protected:
byte _modifiers;
bool _willClose;
Graphics::Surface _canvas;
-
+
int xOff, yOff;
-
+
void addLine(const char *str);
public:
diff --git a/gui/browser.cpp b/gui/browser.cpp
index b6dcea3fc7..50787c4e63 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -57,7 +57,7 @@ int BrowserDialog::runModal() {
NavReplyRecord reply;
OSStatus err;
bool choiceMade = false;
-
+
// If in fullscreen mode, switch to windowed mode
bool wasFullscreen = g_system->getFeatureState(OSystem::kFeatureFullscreenMode);
if (wasFullscreen)
@@ -65,21 +65,21 @@ int BrowserDialog::runModal() {
// Temporarily show the real mouse
ShowCursor();
-
+
err = NavGetDefaultDialogCreationOptions(&options);
assert(err == noErr);
options.windowTitle = _titleRef;
// options.message = CFSTR("Select your game directory");
options.modality = kWindowModalityAppModal;
-
+
if (_isDirBrowser)
err = NavCreateChooseFolderDialog(&options, 0, 0, 0, &dialogRef);
else
err = NavCreateChooseFileDialog(&options, 0, 0, 0, 0, 0, &dialogRef);
assert(err == noErr);
-
+
windowRef = NavDialogGetWindow(dialogRef);
-
+
err = NavDialogRun(dialogRef);
assert(err == noErr);
@@ -90,12 +90,12 @@ int BrowserDialog::runModal() {
if (result == kNavUserActionChoose) {
err = NavDialogGetReply(dialogRef, &reply);
assert(err == noErr);
-
+
if (reply.validRecord && err == noErr) {
SInt32 theCount;
AECountItems(&reply.selection, &theCount);
assert(theCount == 1);
-
+
AEKeyword keyword;
FSRef ref;
char buf[4096];
@@ -103,11 +103,11 @@ int BrowserDialog::runModal() {
assert(err == noErr);
err = FSRefMakePath(&ref, (UInt8*)buf, sizeof(buf)-1);
assert(err == noErr);
-
+
_choice = FilesystemNode(buf);
choiceMade = true;
}
-
+
err = NavDisposeReply(&reply);
assert(err == noErr);
}
@@ -184,7 +184,7 @@ void BrowserDialog::open() {
// Alway refresh file list
updateListing();
-
+
// Call super implementation
Dialog::open();
}
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 826e075bf9..b716364b8d 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -70,7 +70,7 @@ ChooserDialog::ChooserDialog(const String &title, const String &buttonLabel, int
// it's used to list savegames in the 320x200 version of the GUI.
_list = new ListWidget(this, 10, yoffset, _w - 2 * 10, _h - yoffset - buttonHeight - 12, ws);
_list->setNumberingMode(kListNumberingOff);
-
+
// Buttons
addButton(this, _w - 2 * (buttonWidth + 10), _h - buttonHeight - 8, "Cancel", kCloseCmd, 0, ws);
_chooseButton = addButton(this, _w - (buttonWidth + 10), _h - buttonHeight - 8, buttonLabel, kChooseCmd, 0, ws);
diff --git a/gui/console.h b/gui/console.h
index 69b3f88d6a..62deb53c8d 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -53,26 +53,26 @@ protected:
int _currentPos;
int _scrollLine;
int _firstLineInBuffer;
-
+
int _promptStartPos;
int _promptEndPos;
bool _caretVisible;
uint32 _caretTime;
-
+
enum SlideMode {
kNoSlideMode,
kUpSlideMode,
kDownSlideMode
};
-
+
SlideMode _slideMode;
uint32 _slideTime;
ScrollBarWidget *_scrollBar;
// The _callbackProc is called whenver a data line is entered
- //
+ //
InputCallbackProc _callbackProc;
void *_callbackRefCon;
@@ -106,7 +106,7 @@ public:
int vprintf(const char *format, va_list argptr);
#undef putchar
void putchar(int c);
-
+
void setInputCallback(InputCallbackProc proc, void *refCon) {
_callbackProc = proc;
_callbackRefCon = refCon;
diff --git a/gui/dialog.h b/gui/dialog.h
index 74b13cd67c..74ec1e3c13 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -61,7 +61,7 @@ public:
protected:
virtual void open();
virtual void close();
-
+
virtual void draw();
virtual void drawDialog();
@@ -74,7 +74,7 @@ protected:
virtual void handleMouseMoved(int x, int y, int button);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
virtual void handleScreenChanged() {}
-
+
Widget *findWidget(int x, int y); // Find the widget at pos x,y if any
ButtonWidget *addButton(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws = kDefaultWidgetSize);
diff --git a/gui/editable.cpp b/gui/editable.cpp
index 3260f2cb52..f39428ea20 100644
--- a/gui/editable.cpp
+++ b/gui/editable.cpp
@@ -151,7 +151,7 @@ void EditableWidget::drawCaret(bool erase) {
if (y < 0 || y + editRect.height() - 2 >= _h)
return;
-
+
x += getAbsX();
y += getAbsY();
@@ -169,7 +169,7 @@ bool EditableWidget::setCaretPos(int newPos) {
bool EditableWidget::adjustOffset() {
// check if the caret is still within the textbox; if it isn't,
- // adjust _editScrollOffset
+ // adjust _editScrollOffset
int caretpos = getCaretOffset();
const int editWidth = getEditRect().width();
diff --git a/gui/editable.h b/gui/editable.h
index 41bb28da91..9684984dda 100644
--- a/gui/editable.h
+++ b/gui/editable.h
@@ -65,7 +65,7 @@ protected:
void drawCaret(bool erase);
bool setCaretPos(int newPos);
bool adjustOffset();
-
+
virtual bool tryInsertChar(char c, int pos);
};
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 51ffa0d81b..4a5b6d7e9f 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -58,8 +58,8 @@ enum {
kEditGameCmd = 'EDTG',
kRemoveGameCmd = 'REMG',
kQuitCmd = 'QUIT',
-
-
+
+
kCmdGlobalGraphicsOverride = 'OGFX',
kCmdGlobalAudioOverride = 'OSFX',
kCmdGlobalMIDIOverride = 'OMID',
@@ -82,7 +82,7 @@ public:
DomainEditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, WidgetSize ws = kNormalWidgetSize)
: EditTextWidget(boss, x, y, w, h, text, ws) {
}
-
+
protected:
bool tryInsertChar(char c, int pos) {
if (isalnum(c) || c == '-' || c == '_') {
@@ -141,7 +141,7 @@ EditGameDialog::EditGameDialog(const String &domain, GameSettings target)
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
-
+
_w = screenW - 2 * 10;
GUI::WidgetSize ws;
@@ -162,7 +162,7 @@ EditGameDialog::EditGameDialog(const String &domain, GameSettings target)
buttonWidth = kButtonWidth;
labelWidth = 60;
}
-
+
const int x = 5;
const int w = _w - 15;
const int vBorder = 5; // Tab border
@@ -426,7 +426,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
// Change path for extra game data (eg, using sword cutscenes when playing via CD)
- case kCmdExtraBrowser: {
+ case kCmdExtraBrowser: {
BrowserDialog browser("Select additional game directory", true);
if (browser.runModal() > 0) {
// User made his choice...
@@ -490,9 +490,9 @@ LauncherDialog::LauncherDialog(GameDetector &detector)
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
-
+
const int hBorder = 10;
-
+
_w = screenW;
_h = screenH;
@@ -546,7 +546,7 @@ LauncherDialog::LauncherDialog(GameDetector &detector)
// Restore last selection
String last = ConfMan.get(String("lastselectedgame"), ConfigManager::kApplicationDomain);
selectGame(last);
-
+
// En-/disable the buttons depending on the list selection
updateButtons();
@@ -575,11 +575,11 @@ void LauncherDialog::close() {
// Save last selection
const int sel = _list->getSelected();
if (sel >= 0)
- ConfMan.set(String("lastselectedgame"), _domains[sel], ConfigManager::kApplicationDomain);
+ ConfMan.set(String("lastselectedgame"), _domains[sel], ConfigManager::kApplicationDomain);
else
ConfMan.removeKey(String("lastselectedgame"), ConfigManager::kApplicationDomain);
-
- ConfMan.flushToDisk();
+
+ ConfMan.flushToDisk();
Dialog::close();
}
@@ -625,7 +625,7 @@ void LauncherDialog::addGame() {
// 1) show a dir selection dialog which lets the user pick the directory
// the game data resides in.
// 2) try to auto detect which game is in the directory, if we cannot
- // determine it uniquely preent a list of candidates to the user
+ // determine it uniquely preent a list of candidates to the user
// to pick from
// 3) Display the 'Edit' dialog for that item, letting the user specify
// an alternate description (to distinguish multiple versions of the
@@ -640,7 +640,7 @@ void LauncherDialog::addGame() {
// ...so let's determine a list of candidates, games that
// could be contained in the specified directory.
DetectedGameList candidates(PluginManager::instance().detectGames(files));
-
+
int idx;
if (candidates.isEmpty()) {
// No game was found in the specified directory
@@ -655,7 +655,7 @@ void LauncherDialog::addGame() {
StringList list;
for (idx = 0; idx < (int)candidates.size(); idx++)
list.push_back(candidates[idx].description);
-
+
ChooserDialog dialog("Pick the game:");
dialog.setList(list);
idx = dialog.runModal();
@@ -680,7 +680,7 @@ void LauncherDialog::addGame() {
ConfMan.set("description", result.description, domain);
}
ConfMan.set("path", dir.path(), domain);
-
+
const bool customLanguage = (result.language != Common::UNK_LANG);
const bool customPlatform = (result.platform != Common::kPlatformUnknown);
@@ -729,7 +729,7 @@ void LauncherDialog::addGame() {
void LauncherDialog::removeGame(int item) {
MessageDialog alert("Do you really want to remove this game configuration?", "Yes", "No");
-
+
if (alert.runModal() == GUI::kMessageOK) {
// Remove the currently selected game from the list
assert(item >= 0);
@@ -737,7 +737,7 @@ void LauncherDialog::removeGame(int item) {
// Write config to disk
ConfMan.flushToDisk();
-
+
// Update the ListWidget and force a redraw
updateListing();
draw();
@@ -745,7 +745,7 @@ void LauncherDialog::removeGame(int item) {
}
void LauncherDialog::editGame(int item) {
- // Set game specifc options. Most of these should be "optional", i.e. by
+ // Set game specifc options. Most of these should be "optional", i.e. by
// default set nothing and use the global ScummVM settings. E.g. the user
// can set here an optional alternate music volume, or for specific games
// a different music driver etc.
diff --git a/gui/launcher.h b/gui/launcher.h
index ba6cfa5210..9bb94e214a 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -51,12 +51,12 @@ protected:
void updateListing();
void updateButtons();
-
+
void close();
virtual void addGame();
void removeGame(int item);
void editGame(int item);
-
+
void selectGame(const String &name);
};
diff --git a/gui/message.cpp b/gui/message.cpp
index 92afaec7b5..ea7f579c45 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -36,7 +36,7 @@ enum {
MessageDialog::MessageDialog(const Common::String &message, const char *defaultButton, const char *altButton)
: Dialog(30, 20, 260, 124) {
-
+
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
@@ -52,7 +52,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
buttonWidth = kButtonWidth;
buttonHeight = kButtonHeight;
}
-
+
// First, determine the size the dialog needs. For this we have to break
// down the string into lines, and taking the maximum of their widths.
// Using this, and accounting for the space the button(s) need, we can set
@@ -87,7 +87,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
// FIXME - allow for more than two buttons, and return in runModal() which one
// was selected.
- if (defaultButton && altButton) {
+ if (defaultButton && altButton) {
okButtonPos = (_w - (buttonWidth * 2)) / 2;
cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
} else {
@@ -102,7 +102,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
}
void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
- // FIXME: It's a really bad thing that we use two arbitrary constants
+ // FIXME: It's a really bad thing that we use two arbitrary constants
if (cmd == kOkCmd) {
setResult(kMessageOK);
close();
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 2fa29759c2..6bc112a87a 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -138,7 +138,7 @@ void NewGui::runLoop() {
while (_system->pollEvent(event)) {
Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y);
-
+
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
#if !defined(__PALM_OS__)
@@ -335,7 +335,7 @@ void NewGui::drawSurface(const Graphics::Surface &s, int x, int y) {
if (!rect.isValidRect())
return;
-
+
assert(s.bytesPerPixel == sizeof(OverlayColor));
OverlayColor *src = (OverlayColor *)s.pixels;
@@ -374,7 +374,7 @@ void NewGui::blendRect(int x, int y, int w, int h, OverlayColor color, int level
b = ab * a;
OverlayColor *ptr = getBasePtr(rect.left, rect.top);
-
+
h = rect.height();
w = rect.width();
while (h--) {
@@ -390,16 +390,16 @@ void NewGui::blendRect(int x, int y, int w, int h, OverlayColor color, int level
}
} else {
-
+
int r, g, b;
uint8 ar, ag, ab;
_system->colorToRGB(color, ar, ag, ab);
r = ar * level;
g = ag * level;
b = ab * level;
-
+
OverlayColor *ptr = getBasePtr(rect.left, rect.top);
-
+
h = rect.height();
w = rect.width();
while (h--) {
diff --git a/gui/newgui.h b/gui/newgui.h
index 2199c552c4..74cab514aa 100644
--- a/gui/newgui.h
+++ b/gui/newgui.h
@@ -76,7 +76,7 @@ protected:
DialogStack _dialogStack;
bool _stateIsSaved;
-
+
const Graphics::Font *_font;
// for continuous events (keyDown)
@@ -139,7 +139,7 @@ public:
* callers responsibilty to free that data.
*/
void copyToSurface(Graphics::Surface *s, int x, int y, int w, int h);
-
+
/**
* Draw the graphics contained in the given surface at the specified coordinates.
*/
diff --git a/gui/options.cpp b/gui/options.cpp
index 72372e881c..3c51066710 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -91,7 +91,7 @@ void OptionsDialog::open() {
// Reset result value
setResult(0);
-
+
if (_fullscreenCheckbox) {
_gfxPopUp->setSelected(0);
@@ -125,7 +125,7 @@ void OptionsDialog::open() {
#ifndef SMALL_SCREEN_DEVICE
// Fullscreen setting
_fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
-
+
// Aspect ratio setting
_aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain));
#endif
@@ -150,7 +150,7 @@ void OptionsDialog::open() {
}
if (_multiMidiCheckbox) {
-
+
// Multi midi setting
_multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain));
@@ -160,7 +160,7 @@ void OptionsDialog::open() {
// GS extensions setting
_enableGSCheckbox->setState(ConfMan.getBool("enable_gs", _domain));
}
-
+
if (_musicVolumeSlider) {
int vol;
@@ -213,7 +213,7 @@ void OptionsDialog::close() {
if (_subCheckbox) {
if (_enableAudioSettings) {
- ConfMan.set("subtitles", _subCheckbox->getState(), _domain);
+ ConfMan.set("subtitles", _subCheckbox->getState(), _domain);
const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
while (md->name && md->id != (int)_midiPopUp->getSelectedTag())
md++;
@@ -223,7 +223,7 @@ void OptionsDialog::close() {
ConfMan.removeKey("music_driver", _domain);
} else {
ConfMan.removeKey("music_driver", _domain);
- ConfMan.removeKey("subtitles", _domain);
+ ConfMan.removeKey("subtitles", _domain);
}
}
@@ -353,9 +353,9 @@ int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset, WidgetSize w
#ifdef SMALL_SCREEN_DEVICE
_fullscreenCheckbox->setState(TRUE);
_fullscreenCheckbox->setEnabled(FALSE);
- _aspectCheckbox->setEnabled(FALSE);
+ _aspectCheckbox->setEnabled(FALSE);
#endif
-
+
_enableGraphicSettings = true;
return yoffset;
@@ -376,7 +376,7 @@ int OptionsDialog::addAudioControls(GuiObject *boss, int yoffset, WidgetSize ws)
// The MIDI mode popup & a label
_midiPopUp = addPopUp(boss, x-5, yoffset, w+5, "Music driver: ", labelWidth, ws);
yoffset += _midiPopUp->getHeight() + 4;
-
+
// Populate it
const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
while (md->name) {
@@ -389,7 +389,7 @@ int OptionsDialog::addAudioControls(GuiObject *boss, int yoffset, WidgetSize ws)
yoffset += _subCheckbox->getHeight();
yoffset += 18;
-
+
_enableAudioSettings = true;
return yoffset;
@@ -418,7 +418,7 @@ int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset, WidgetSize ws)
// Multi midi setting
_multiMidiCheckbox = addCheckbox(boss, x, yoffset, "Mixed Adlib/MIDI mode", 0, 0, ws);
yoffset += _multiMidiCheckbox->getHeight() + spacing;
-
+
// Native mt32 setting
_mt32Checkbox = addCheckbox(boss, x, yoffset, "True Roland MT-32 (disable GM emulation)", 0, 0, ws);
yoffset += _mt32Checkbox->getHeight() + spacing;
@@ -426,7 +426,7 @@ int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset, WidgetSize ws)
// GS Extensions setting
_enableGSCheckbox = addCheckbox(boss, x, yoffset, "Enable Roland GS Mode", 0, 0, ws);
yoffset += _enableGSCheckbox->getHeight() + spacing;
-
+
_enableMIDISettings = true;
return yoffset;
@@ -491,7 +491,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
GUI::WidgetSize ws;
int buttonWidth, buttonHeight;
-
+
if (screenW >= 400 && screenH >= 300) {
ws = GUI::kBigWidgetSize;
buttonWidth = kBigButtonWidth;
@@ -531,7 +531,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
yoffset = addAudioControls(tab, yoffset, ws);
yoffset = addVolumeControls(tab, yoffset, ws);
// TODO: cd drive setting
-
+
//
// 3) The MIDI tab
//
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 9e9513fa9e..6a9818d39c 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -240,7 +240,7 @@ void SliderWidget::handleMouseMoved(int x, int y, int button) {
newValue = _valueMax;
if (newValue != _value) {
- _value = newValue;
+ _value = newValue;
draw();
sendCommand(_cmd, _value); // FIXME - hack to allow for "live update" in sound dialog
}
@@ -285,7 +285,7 @@ int SliderWidget::posToValue(int pos) {
GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h)
: Widget(boss, x, y, w, h), _gfx() {
- _flags = WIDGET_ENABLED | WIDGET_CLEARBG;
+ _flags = WIDGET_ENABLED | WIDGET_CLEARBG;
_type = kGraphicsWidget;
}
@@ -295,10 +295,10 @@ GraphicsWidget::~GraphicsWidget() {
void GraphicsWidget::setGfx(const Graphics::Surface *gfx) {
_gfx.free();
-
+
if (!gfx || !gfx->pixels)
return;
-
+
// TODO: add conversion to OverlayColor
_gfx.create(gfx->w, gfx->h, gfx->bytesPerPixel);
memcpy(_gfx.pixels, gfx->pixels, gfx->h * gfx->pitch);
diff --git a/gui/widget.h b/gui/widget.h
index 7c573ad838..4def1eef6c 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -104,7 +104,7 @@ public:
virtual int16 getAbsX() const { return _x + _boss->getChildX(); }
virtual int16 getAbsY() const { return _y + _boss->getChildY(); }
-
+
// virtual void setPos(int x, int y);
// virtual void setSize(int w, int h);
@@ -245,11 +245,11 @@ class GraphicsWidget : public Widget {
public:
GraphicsWidget(GuiObject *boss, int x, int y, int w, int h);
~GraphicsWidget();
-
+
void setGfx(const Graphics::Surface *gfx);
protected:
void drawWidget(bool hilite);
-
+
Graphics::Surface _gfx;
};