[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.19,1.20 ListWidget.cpp,1.28,1.29 PopUpWidget.cpp,1.25,1.26 PopUpWidget.h,1.7,1.8 ScrollBarWidget.cpp,1.13,1.14 ScrollBarWidget.h,1.4,1.5 TabWidget.cpp,1.6,1.7 TabWidget.h,1.3,1.4 about.cpp,1.8,1.9 browser.cpp,1.14,1.15 chooser.cpp,1.8,1.9 console.cpp,1.35,1.36 console.h,1.19,1.20 dialog.cpp,1.39,1.40 launcher.cpp,1.76,1.77 message.cpp,1.15,1.16 newgui.cpp,1.67,1.68 newgui.h,1.32,1.33 options.cpp,1.41,1.42 options.h,1.11,1.12 widget.cpp,1.29,1.30 widget.h,1.31,1.32

Pawel Kolodziejski aquadran at users.sourceforge.net
Sat Nov 8 15:23:09 CET 2003


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv3768

Modified Files:
	EditTextWidget.cpp ListWidget.cpp PopUpWidget.cpp 
	PopUpWidget.h ScrollBarWidget.cpp ScrollBarWidget.h 
	TabWidget.cpp TabWidget.h about.cpp browser.cpp chooser.cpp 
	console.cpp console.h dialog.cpp launcher.cpp message.cpp 
	newgui.cpp newgui.h options.cpp options.h widget.cpp widget.h 
Log Message:
cleanup whitespaces

Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- EditTextWidget.cpp	4 Nov 2003 22:00:31 -0000	1.19
+++ EditTextWidget.cpp	8 Nov 2003 23:22:15 -0000	1.20
@@ -24,7 +24,7 @@
 #include "newgui.h"
 
 EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text)
-	: StaticTextWidget(boss, x, y-1, w, h+2, text, kTextAlignLeft), _backupString(text) {
+	: StaticTextWidget(boss, x, y - 1, w, h + 2, text, kTextAlignLeft), _backupString(text) {
 	_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
 	_type = kEditTextWidget;
 

Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- ListWidget.cpp	2 Nov 2003 17:41:01 -0000	1.28
+++ ListWidget.cpp	8 Nov 2003 23:22:15 -0000	1.29
@@ -39,7 +39,7 @@
 
 	_caretVisible = false;
 	_caretTime = 0;
-	
+
 	// FIXME: This flag should come from widget definition
 	_editable = true;
 

Index: PopUpWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- PopUpWidget.cpp	7 Nov 2003 02:26:55 -0000	1.25
+++ PopUpWidget.cpp	8 Nov 2003 23:22:15 -0000	1.26
@@ -273,7 +273,7 @@
 	_type = kPopUpWidget;
 
 	_selectedItem = -1;
-	
+
 	if (!_label.isEmpty() && _labelWidth == 0)
 		_labelWidth = g_gui.getStringWidth(_label);
 }

Index: PopUpWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- PopUpWidget.h	5 Nov 2003 11:24:37 -0000	1.7
+++ PopUpWidget.h	8 Nov 2003 23:22:15 -0000	1.8
@@ -39,7 +39,7 @@
 class PopUpWidget : public Widget, public CommandSender {
 	friend class PopUpDialog;
 	typedef Common::String String;
-	
+
 	struct Entry {
 		String	name;
 		uint32	tag;

Index: ScrollBarWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ScrollBarWidget.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ScrollBarWidget.cpp	7 Nov 2003 02:26:55 -0000	1.13
+++ ScrollBarWidget.cpp	8 Nov 2003 23:22:15 -0000	1.14
@@ -224,24 +224,24 @@
 	// Up arrow
 	gui->frameRect(_x, _y, _w, UP_DOWN_BOX_HEIGHT, gui->_color);
 	gui->drawBitmap(up_arrow, _x, _y,
-	                isSinglePage ? gui->_color :
-	                (hilite && _part == kUpArrowPart) ? gui->_textcolorhi : gui->_textcolor);
+					isSinglePage ? gui->_color :
+					(hilite && _part == kUpArrowPart) ? gui->_textcolorhi : gui->_textcolor);
 
 	// Down arrow
 	gui->frameRect(_x, bottomY - UP_DOWN_BOX_HEIGHT, _w, UP_DOWN_BOX_HEIGHT, gui->_color);
 	gui->drawBitmap(down_arrow, _x, bottomY - UP_DOWN_BOX_HEIGHT,
-	                isSinglePage ? gui->_color :
-	                (hilite && _part == kDownArrowPart) ? gui->_textcolorhi : gui->_textcolor);
+					isSinglePage ? gui->_color :
+					(hilite && _part == kDownArrowPart) ? gui->_textcolorhi : gui->_textcolor);
 
 	// Slider
 	if (!isSinglePage) {
 		gui->fillRect(_x, _y + _sliderPos, _w, _sliderHeight,
-		              (hilite && _part == kSliderPart) ? gui->_textcolorhi : gui->_textcolor);
+					(hilite && _part == kSliderPart) ? gui->_textcolorhi : gui->_textcolor);
 		gui->frameRect(_x, _y + _sliderPos, _w, _sliderHeight, gui->_color);
-		int y = _y + _sliderPos + _sliderHeight/2;
+		int y = _y + _sliderPos + _sliderHeight / 2;
 		NewGuiColor color = (hilite && _part == kSliderPart) ? gui->_color : gui->_shadowcolor;
-		gui->hLine(_x+2, y-2, _x+_w-3, color);
-		gui->hLine(_x+2, y, _x+_w-3, color);
-		gui->hLine(_x+2, y+2, _x+_w-3, color);
+		gui->hLine(_x + 2, y - 2, _x + _w - 3, color);
+		gui->hLine(_x + 2, y, _x + _w - 3, color);
+		gui->hLine(_x + 2, y + 2, _x + _w-3, color);
 	}
 }

Index: ScrollBarWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ScrollBarWidget.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ScrollBarWidget.h	2 Nov 2003 14:50:44 -0000	1.4
+++ ScrollBarWidget.h	8 Nov 2003 23:22:15 -0000	1.5
@@ -66,7 +66,7 @@
 	void handleMouseEntered(int button)	{ setFlags(WIDGET_HILITED); }
 	void handleMouseLeft(int button)	{ clearFlags(WIDGET_HILITED); _part = kNoPart; draw(); }
 	void handleTickle();
-	
+
 	// FIXME - this should be private, but then we also have to add accessors
 	// for _numEntries, _entriesPerPage and _currentPos. This again leads to the question:
 	// should these accessors force a redraw?

Index: TabWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/TabWidget.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- TabWidget.cpp	7 Nov 2003 14:50:32 -0000	1.6
+++ TabWidget.cpp	8 Nov 2003 23:22:15 -0000	1.7
@@ -26,7 +26,7 @@
 
 enum {
 	kTabHeight = 15,
-	
+
 	kTabLeftOffset = 4,
 	kTabSpacing = 2,
 	kTabPadding = 3
@@ -34,11 +34,11 @@
 
 TabWidget::TabWidget(GuiObject *boss, int x, int y, int w, int h)
 	: Widget(boss, x, y, w, h) {
-	
+
 	_flags = WIDGET_ENABLED;
 	_type = kTabWidget;
 	_activeTab = -1;
-	
+
 	_tabWidth = 40;
 }
 
@@ -61,7 +61,7 @@
 	 newTab.firstWidget = NULL;
 
 	_tabs.push_back(newTab);
-	
+
 	int numTabs = _tabs.size();
 
 	// Determine the new tab width
@@ -71,10 +71,10 @@
 	int maxWidth = (_w - kTabLeftOffset) / numTabs - kTabLeftOffset;
 	if (_tabWidth > maxWidth)
 		_tabWidth = maxWidth;
-	
+
 	// Activate the new tab
 	setActiveTab(numTabs - 1);
-	
+
 	return _activeTab;
 }
 
@@ -102,7 +102,7 @@
 		if (tabID >= _tabs.size())
 			tabID = -1;
 	}
-	
+
 	// If a tab was clicked, switch to that pane
 	if (tabID >= 0) {
 		setActiveTab(tabID);
@@ -120,7 +120,7 @@
 	NewGui *gui = &g_gui;
 	
 	// Draw horizontal line
-	gui->hLine(_x+1, _y + kTabHeight - 2, _x + _w - 2, gui->_shadowcolor);
+	gui->hLine(_x + 1, _y + kTabHeight - 2, _x + _w - 2, gui->_shadowcolor);
 
 	// Iterate over all tabs and draw them
 	int i, x = _x + kTabLeftOffset;
@@ -128,7 +128,7 @@
 		NewGuiColor color = (i == _activeTab) ? gui->_color : gui->_shadowcolor;
 		int yOffset = (i == _activeTab) ? 0 : 2; 
 		gui->box(x, _y + yOffset, _tabWidth, kTabHeight - yOffset, color, color);
-		gui->drawString(_tabs[i].title, x + kTabPadding, _y + yOffset/2 + 4, _tabWidth - 2 * kTabPadding, gui->_textcolor, kTextAlignCenter);
+		gui->drawString(_tabs[i].title, x + kTabPadding, _y + yOffset / 2 + 4, _tabWidth - 2 * kTabPadding, gui->_textcolor, kTextAlignCenter);
 		x += _tabWidth + kTabSpacing;
 	}
 

Index: TabWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/TabWidget.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TabWidget.h	7 Nov 2003 14:50:32 -0000	1.3
+++ TabWidget.h	8 Nov 2003 23:22:15 -0000	1.4
@@ -40,7 +40,7 @@
 public:
 	TabWidget(GuiObject *boss, int x, int y, int w, int h);
 	~TabWidget();
-	
+
 	virtual int16	getChildY() const;
 
 // use Dialog::releaseFocus() when changing to another tab

Index: about.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/about.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- about.cpp	4 Nov 2003 03:31:50 -0000	1.8
+++ about.cpp	8 Nov 2003 23:22:15 -0000	1.9
@@ -26,8 +26,8 @@
 
 AboutDialog::AboutDialog()
 	: Dialog(10, 20, 300, 144) {
-	addButton((_w - kButtonWidth)/2, 120, "OK", kCloseCmd, '\r');	// Close dialog - FIXME
-	
+	addButton((_w - kButtonWidth) / 2, 120, "OK", kCloseCmd, '\r');	// Close dialog - FIXME
+
 	Common::String version("ScummVM ");
 	version += gScummVMVersion;
 	new StaticTextWidget(this, 10, 10, _w - 20, kLineHeight, version, kTextAlignCenter);

Index: browser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/browser.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- browser.cpp	2 Nov 2003 02:18:14 -0000	1.14
+++ browser.cpp	8 Nov 2003 23:22:15 -0000	1.15
@@ -47,7 +47,7 @@
 	_choice = NULL;
 
 	// Headline - TODO: should be customizable during creation time
-	new StaticTextWidget(this, 10, 8, _w-2 * 10, kLineHeight, title, kTextAlignCenter);
+	new StaticTextWidget(this, 10, 8, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
 
 	// Current path - TODO: handle long paths ?
 	_currentPath = new StaticTextWidget(this, 10, 20, _w - 2 * 10, kLineHeight,
@@ -59,8 +59,8 @@
 
 	// Buttons
 	addButton(10, _h - 24, "Go up", kGoUpCmd, 0);
-	addButton(_w-2 * (kButtonWidth+10), _h - 24, "Cancel", kCloseCmd, 0);
-	addButton(_w-(kButtonWidth+10), _h-24, "Choose", kChooseCmd, 0);
+	addButton(_w - 2 * (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd, 0);
+	addButton(_w - (kButtonWidth+10), _h - 24, "Choose", kChooseCmd, 0);
 }
 
 BrowserDialog::~BrowserDialog() {
@@ -99,7 +99,7 @@
 
 void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	FilesystemNode *tmp;
-	
+
 	switch (cmd) {
 	case kChooseCmd: {
 			// If nothing is selected in the list widget, choose the current dir.
@@ -150,7 +150,7 @@
 	}
 	_fileList->setList(list);
 	_fileList->scrollTo(0);
-	
+
 	// Finally, redraw
 	draw();
 }

Index: chooser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/chooser.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- chooser.cpp	3 Nov 2003 23:14:21 -0000	1.8
+++ chooser.cpp	8 Nov 2003 23:22:15 -0000	1.9
@@ -28,7 +28,7 @@
 };
 
 ChooserDialog::ChooserDialog(const String &title, const StringList& list, const String &buttonLabel, int height)
-	: Dialog(8, (200 - height) / 2, 320 -2 * 8, height) {
+	: Dialog(8, (200 - height) / 2, 320 - 2 * 8, height) {
 	// Headline
 	new StaticTextWidget(this, 10, 6, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
 

Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- console.cpp	2 Nov 2003 02:18:14 -0000	1.35
+++ console.cpp	8 Nov 2003 23:22:15 -0000	1.36
@@ -79,7 +79,7 @@
 //	_w = _w * kCharWidth + kScrollBarWidth + 2;
 	_h = (uint16)((_heightPercent * g_system->get_overlay_height() - 2) / kLineHeight);
 	_h = _h * kLineHeight + 2;
-	
+
 	// Calculate depending values
 	_lineWidth = (_w - kScrollBarWidth - 2) / kCharWidth;
 	_linesPerPage = (_h - 2) / kLineHeight;
@@ -205,7 +205,7 @@
 			int len = _currentPos - _promptStartPos;
 			assert(len >= 0);
 			char *str = new char[len + 1];
-	
+
 			// Copy the user input to str
 			for (i = 0; i < len; i++)
 				str[i] = _buffer[(_promptStartPos + i) % kBufferSize];
@@ -272,7 +272,7 @@
 		} else if (modifiers == OSystem::KBD_CTRL) {
 			specialKeys(keycode);
 		} else if (isprint((char)ascii)) {
-			for (i = _promptEndPos-1; i >= _currentPos; i--)
+			for (i = _promptEndPos - 1; i >= _currentPos; i--)
 				_buffer[(i + 1) % kBufferSize] = _buffer[i % kBufferSize];
 			_promptEndPos++;
 			putchar((char)ascii);
@@ -284,7 +284,7 @@
 void ConsoleDialog::insertIntoPrompt(const char* str)
 {
 	unsigned int l = strlen(str);
-	for (int i = _promptEndPos-1; i >= _currentPos; i--)
+	for (int i = _promptEndPos - 1; i >= _currentPos; i--)
 		_buffer[(i + l) % kBufferSize] = 
 			_buffer[i % kBufferSize];
 	for (unsigned int j = 0; j < l; ++j) {
@@ -334,7 +334,7 @@
 
 void ConsoleDialog::killChar() {
 	for (int i = _currentPos; i < _promptEndPos; i++)
-		_buffer[i % kBufferSize] = _buffer[(i+1) % kBufferSize];
+		_buffer[i % kBufferSize] = _buffer[(i + 1) % kBufferSize];
 	_buffer[_promptEndPos % kBufferSize] = ' ';
 	_promptEndPos--;
 }
@@ -361,7 +361,7 @@
 	}
 
 	for (int i = _currentPos; i < _promptEndPos; i++)
-		_buffer[i % kBufferSize] = _buffer[(i+cnt) % kBufferSize];
+		_buffer[i % kBufferSize] = _buffer[(i + cnt) % kBufferSize];
 	_buffer[_promptEndPos % kBufferSize] = ' ';
 	_promptEndPos -= cnt;
 }
@@ -384,7 +384,7 @@
 			_history[_historyIndex][i] = _buffer[(_promptStartPos + i) % kBufferSize];
 		_history[_historyIndex][i] = '\0';
 	}
-	
+
 	// Advance to the next line in the history
 	int line = _historyLine + direction;
 	if ((direction < 0 && line < 0) || (direction > 0 && line > _historySize))

Index: console.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- console.h	2 Nov 2003 02:18:14 -0000	1.19
+++ console.h	8 Nov 2003 23:22:15 -0000	1.20
@@ -72,10 +72,9 @@
 	int _historySize;
 	int _historyIndex;
 	int _historyLine;
-	
-	
+
 	float _widthPercent, _heightPercent;
-	
+
 	void reflowLayout();
 
 public:

Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- dialog.cpp	7 Nov 2003 14:50:32 -0000	1.39
+++ dialog.cpp	8 Nov 2003 23:22:15 -0000	1.40
@@ -56,7 +56,7 @@
 	_result = 0;
 	_visible = true;
 	g_gui.openDialog(this);
-	
+
 	// Search for the first objects that wantsFocus() (if any) and give it the focus
 	while (w && !w->wantsFocus()) {
 		w = w->_next;
@@ -239,7 +239,7 @@
 	if (!w || !(w->getFlags() & WIDGET_TRACK_MOUSE)) {
 		return;
 	}
-	
+
 	w->handleMouseMoved(x - (w->getAbsX() - _x), y - (w->getAbsY() - _y), button);
 }
 

Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- launcher.cpp	7 Nov 2003 16:01:50 -0000	1.76
+++ launcher.cpp	8 Nov 2003 23:22:15 -0000	1.77
@@ -127,18 +127,18 @@
 	yoffset = vBorder;
 
 	// GUI:  Label & edit widget for the game ID
-	new StaticTextWidget(tab, x, yoffset+2, labelWidth, kLineHeight, "ID: ", kTextAlignRight);
-	_domainWidget = new EditTextWidget(tab, x+labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, _domain);
+	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "ID: ", kTextAlignRight);
+	_domainWidget = new EditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, _domain);
 	yoffset += 16;
 
 	// GUI:  Label & edit widget for the description
-	new StaticTextWidget(tab, x, yoffset+2, labelWidth, kLineHeight, "Name: ", kTextAlignRight);
-	_descriptionWidget = new EditTextWidget(tab, x+labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, description);
+	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "Name: ", kTextAlignRight);
+	_descriptionWidget = new EditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, description);
 	yoffset += 16;
 
 	// GUI:  Label for the game path
 	new StaticTextWidget(tab, x, yoffset, labelWidth, kLineHeight, "Path: ", kTextAlignRight);
-	new StaticTextWidget(tab, x+labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, path, kTextAlignLeft);
+	new StaticTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10, kLineHeight, path, kTextAlignLeft);
 	yoffset += 16;
 
 	// Languag popup
@@ -393,7 +393,7 @@
 	//    an alternate description (to distinguish multiple versions of the
 	//    game, e.g. 'Monkey German' and 'Monkey English') and set default
 	//    options for that game.
-	
+
 	if (_browser->runModal()) {
 		// User made his choice...
 		FilesystemNode *dir = _browser->getResult();
@@ -449,7 +449,7 @@
 				ConfMan.set("description", result.description, domain);
 			}
 			ConfMan.set("path", dir->path(), domain);
-			
+
 			// Display edit dialog for the new entry
 			EditGameDialog editDialog(domain, result);
 			if (editDialog.runModal()) {
@@ -503,7 +503,7 @@
 
 		// Write config to disk
 		ConfMan.flushToDisk();
-		
+
 		// Update the ListWidget and force a redraw
 		updateListing();
 		draw();

Index: message.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/message.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- message.cpp	2 Nov 2003 14:50:44 -0000	1.15
+++ message.cpp	8 Nov 2003 23:22:15 -0000	1.16
@@ -43,7 +43,7 @@
 	const char *start = str;
 	int lineWidth, maxlineWidth = 0;
 	int lineCount, okButtonPos, cancelButtonPos;
-	
+
 	while (*str) {
 		if (*str == '\n') {
 			lineWidth = addLine(lines, start, str - start);
@@ -58,7 +58,7 @@
 	lineWidth = addLine(lines, start, str - start);
 	if (maxlineWidth < lineWidth)
 		maxlineWidth = lineWidth;
-	
+
 	// Calculate the desired dialog size (maxing out at 300*180 for now)
 	_w = maxlineWidth + 20;
 	lineCount = lines.size();
@@ -72,19 +72,19 @@
 	}
 	_x = (320 - _w) / 2;
 	_y = (200 - _h) / 2;
-	
+
 	for (int i = 0; i < lineCount; i++) {
-		new StaticTextWidget(this, 10, 10+i*kLineHeight, maxlineWidth, kLineHeight,
+		new StaticTextWidget(this, 10, 10 + i * kLineHeight, maxlineWidth, kLineHeight,
 								lines[i], kTextAlignCenter);
 	}
 
 	// FIXME - allow for multiple buttons, and return in runModal() which one
 	// was selected.
 	if (defaultButton && altButton) { 
-		okButtonPos = (_w - (kButtonWidth * 2))/2;
-		cancelButtonPos = ((_w - (kButtonWidth * 2))/2) + kButtonWidth + 10;
+		okButtonPos = (_w - (kButtonWidth * 2)) / 2;
+		cancelButtonPos = ((_w - (kButtonWidth * 2)) / 2) + kButtonWidth + 10;
 	} else {
-		okButtonPos = cancelButtonPos = (_w-kButtonWidth)/2;
+		okButtonPos = cancelButtonPos = (_w-kButtonWidth) / 2;
 	}
 
 	if (defaultButton)
@@ -112,16 +112,16 @@
 				newPos--;
 			if (newPos > start)
 				pos = newPos;
-			
+
 			// Add the substring from intervall [start, i-1]
 			tmp = String(start, pos - start);
 			lines.push_back(tmp);
-			
+
 			// Determine the width of the string, and adjust maxWidth accordingly
 			width = gui->getStringWidth(tmp);
 			if (maxWidth < width)
 				maxWidth = width;
-			
+
 			start = pos;
 			width = 0;
 		} else {

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- newgui.cpp	4 Nov 2003 22:00:35 -0000	1.67
+++ newgui.cpp	8 Nov 2003 23:22:15 -0000	1.68
@@ -338,9 +338,9 @@
 	while (h--) {
 		for (int i = 0; i < w; i++) {
 			_system->colorToRGB(ptr[i], ar, ag, ab);
-			ptr[i] = _system->RGBToColor((ar+r)/(level+1),
-										 (ag+g)/(level+1),
-										 (ab+b)/(level+1));
+			ptr[i] = _system->RGBToColor((ar + r) / (level+1),
+										 (ag + g) / (level+1),
+										 (ab + b) / (level+1));
 		}
 		ptr += _screenPitch;
 	}
@@ -481,15 +481,13 @@
 		for (; i < s.size(); ++i) {
 			str += s[i];
 		}
-		
+
 		width = getStringWidth(str);
-		
+
 	} else {
 		str = s;
 	}
-	
-	
-	
+
 	if (align == kTextAlignCenter)
 		x = x + (w - width - 1)/2;
 	else if (align == kTextAlignRight)
@@ -528,7 +526,7 @@
 
 	assert(buf);
 	while (h--) {
-		memcpy(buf, ptr, w*2);
+		memcpy(buf, ptr, w * 2);
 		ptr += _screenPitch;
 		buf += pitch;
 	}

Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- newgui.h	4 Nov 2003 22:00:35 -0000	1.32
+++ newgui.h	8 Nov 2003 23:22:16 -0000	1.33
@@ -57,7 +57,7 @@
 	
 	bool	empty() const		{ return _size <= 0; }
 	void	push(Dialog *d)		{ _stack[_size++] = d; }
-	Dialog	*top() const		{ return _stack[_size-1]; }
+	Dialog	*top() const		{ return _stack[_size - 1]; }
 	void	pop()				{ if (_size > 0) _stack[--_size] = 0; }
 	int		size() const		{ return _size; }
 	Dialog	*operator [](int i)	{ return _stack[i]; }

Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- options.cpp	7 Nov 2003 16:01:51 -0000	1.41
+++ options.cpp	8 Nov 2003 23:22:16 -0000	1.42
@@ -66,7 +66,7 @@
 
 void OptionsDialog::open() {
 	Dialog::open();
-	
+
 	// Reset result value
 	setResult(0);
 	
@@ -74,7 +74,7 @@
 		// FIXME - disable GFX popup for now
 		_gfxPopUp->setSelected(0);
 		_gfxPopUp->setEnabled(false);
-	
+
 		// Fullscreen setting
 		_fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
 	
@@ -95,25 +95,25 @@
 			md++;
 		}
 		_midiPopUp->setSelected(md->name ? i : 0);
-	
+
 		// Multi midi setting
 		_multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain));
-	
+
 		// Native mt32 setting
 		_mt32Checkbox->setState(ConfMan.getBool("native_mt32", _domain));
 	}
-	
+
 	if (_masterVolumeSlider) {
 		int vol;
-	
+
 		vol = ConfMan.getInt("master_volume", _domain);
 		_masterVolumeSlider->setValue(vol);
 		_masterVolumeLabel->setValue(vol);
-	
+
 		vol = ConfMan.getInt("music_volume", _domain);
 		_musicVolumeSlider->setValue(vol);
 		_musicVolumeLabel->setValue(vol);
-	
+
 		vol = ConfMan.getInt("sfx_volume", _domain);
 		_sfxVolumeSlider->setValue(vol);
 		_sfxVolumeLabel->setValue(vol);
@@ -148,7 +148,7 @@
 			if (_enableAudioSettings) {
 				ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain);
 				ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain);
-		
+
 				const MidiDriverDescription *md = getAvailableMidiDrivers();
 				while (md->name && md->id != (int)_midiPopUp->getSelectedTag())
 					md++;
@@ -162,7 +162,7 @@
 				ConfMan.removeKey("music_driver", _domain);
 			}
 		}
-		
+
 		// Save config file
 		ConfMan.flushToDisk();
 	}
@@ -220,7 +220,6 @@
 	_sfxVolumeLabel->setEnabled(enabled);
 }
 
-
 int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset) {
 	const int x = 10;
 	const int w = _w - 2 * 10;
@@ -291,23 +290,23 @@
 int OptionsDialog::addVolumeControls(GuiObject *boss, int yoffset) {
 	// Volume controllers
 	_masterVolumeSlider = new SliderWidget(boss, 5, yoffset, 185, 12,  "Master volume: ", 100, kMasterVolumeChanged);
-	_masterVolumeLabel = new StaticTextWidget(boss, 200, yoffset+2, 24, kLineHeight, "100%", kTextAlignLeft);
+	_masterVolumeLabel = new StaticTextWidget(boss, 200, yoffset + 2, 24, kLineHeight, "100%", kTextAlignLeft);
 	_masterVolumeSlider->setMinValue(0); _masterVolumeSlider->setMaxValue(255);
 	_masterVolumeLabel->setFlags(WIDGET_CLEARBG);
 	yoffset += 16;
 
 	_musicVolumeSlider = new SliderWidget(boss, 5, yoffset, 185, 12, "Music volume: ", 100, kMusicVolumeChanged);
-	_musicVolumeLabel = new StaticTextWidget(boss, 200, yoffset+2, 24, kLineHeight, "100%", kTextAlignLeft);
+	_musicVolumeLabel = new StaticTextWidget(boss, 200, yoffset + 2, 24, kLineHeight, "100%", kTextAlignLeft);
 	_musicVolumeSlider->setMinValue(0); _musicVolumeSlider->setMaxValue(255);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
 	yoffset += 16;
 
 	_sfxVolumeSlider = new SliderWidget(boss, 5, yoffset, 185, 12, "SFX volume: ", 100, kSfxVolumeChanged);
-	_sfxVolumeLabel = new StaticTextWidget(boss, 200, yoffset+2, 24, kLineHeight, "100%", kTextAlignLeft);
+	_sfxVolumeLabel = new StaticTextWidget(boss, 200, yoffset + 2, 24, kLineHeight, "100%", kTextAlignLeft);
 	_sfxVolumeSlider->setMinValue(0); _sfxVolumeSlider->setMaxValue(255);
 	_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
 	yoffset += 16;
-	
+
 	_enableVolumeSettings = true;
 
 	return yoffset;
@@ -351,13 +350,13 @@
 
 #if !( defined(__DC__) || defined(__GP32__) )
 	// Save game path
-	new StaticTextWidget(tab, 5, yoffset+2, 100, kLineHeight, "Savegame path: ", kTextAlignRight);
-	_savePath = new StaticTextWidget(tab, 105, yoffset+2, 180, kLineHeight, "/foo/bar", kTextAlignLeft);
-	new ButtonWidget(tab, 105, yoffset+14, 64, 16, "Choose...", kChooseSaveDirCmd, 0);
+	new StaticTextWidget(tab, 5, yoffset + 2, 100, kLineHeight, "Savegame path: ", kTextAlignRight);
+	_savePath = new StaticTextWidget(tab, 105, yoffset + 2, 180, kLineHeight, "/foo/bar", kTextAlignLeft);
+	new ButtonWidget(tab, 105, yoffset + 14, 64, 16, "Choose...", kChooseSaveDirCmd, 0);
 #endif
 	// TODO: joystick setting
 
-	
+
 	// Activate the first tab
 	tab->setActiveTab(0);
 

Index: options.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- options.h	7 Nov 2003 16:01:51 -0000	1.11
+++ options.h	8 Nov 2003 23:22:16 -0000	1.12
@@ -52,7 +52,7 @@
 	int addGraphicControls(GuiObject *boss, int yoffset);
 	int addMIDIControls(GuiObject *boss, int yoffset);
 	int addVolumeControls(GuiObject *boss, int yoffset);
-	
+
 	void setGraphicSettingsState(bool enabled);
 	void setAudioSettingsState(bool enabled);
 	void setVolumeSettingsState(bool enabled);

Index: widget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- widget.cpp	7 Nov 2003 16:01:51 -0000	1.29
+++ widget.cpp	8 Nov 2003 23:22:16 -0000	1.30
@@ -42,7 +42,7 @@
 
 	if (!isVisible() || !_boss->isVisible())
 		return;
-	
+
 	int oldX = _x, oldY = _y;
 
 	// Account for our relative position in the dialog
@@ -140,8 +140,8 @@
 void ButtonWidget::drawWidget(bool hilite) {
 	NewGui *gui = &g_gui;
 	gui->drawString(_label, _x, _y, _w,
-	                !isEnabled() ? gui->_color :
-	                hilite ? gui->_textcolorhi : gui->_textcolor, _align);
+					!isEnabled() ? gui->_color :
+					hilite ? gui->_textcolorhi : gui->_textcolor, _align);
 }
 
 #pragma mark -
@@ -249,8 +249,8 @@
 
 	// Draw the 'bar'
 	gui->fillRect(_x + _labelWidth + 2, _y + 2, valueToPos(_value), _h - 4,
-	              !isEnabled() ? gui->_color :
-	              hilite ? gui->_textcolorhi : gui->_textcolor);
+				!isEnabled() ? gui->_color :
+				hilite ? gui->_textcolorhi : gui->_textcolor);
 }
 
 int SliderWidget::valueToPos(int value) {

Index: widget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- widget.h	7 Nov 2003 14:50:32 -0000	1.31
+++ widget.h	8 Nov 2003 23:22:16 -0000	1.32
@@ -111,7 +111,7 @@
 
 	virtual void receivedFocusWidget() {}
 	virtual void lostFocusWidget() {}
-	
+
 	virtual Widget *findWidget(int x, int y) { return this; }
 
 	void releaseFocus() { assert(_boss); _boss->releaseFocus(); }





More information about the Scummvm-git-logs mailing list