[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.14,1.15 ListWidget.cpp,1.23,1.24 PopUpWidget.cpp,1.16,1.17 console.cpp,1.33,1.34 newgui.cpp,1.61,1.62 newgui.h,1.27,1.28

Jonathan Gray khalek at users.sourceforge.net
Wed Oct 1 08:02:02 CEST 2003


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

Modified Files:
	EditTextWidget.cpp ListWidget.cpp PopUpWidget.cpp console.cpp 
	newgui.cpp newgui.h 
Log Message:
vline -> vLine, hline-> hLine, slightly more in line with ScummVM naming style and more importantly doesn't conflict with the vline and hline Allegro functions

Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- EditTextWidget.cpp	24 Sep 2003 06:29:47 -0000	1.14
+++ EditTextWidget.cpp	1 Oct 2003 15:00:23 -0000	1.15
@@ -147,10 +147,10 @@
 	NewGui *gui = _boss->getGui();
 
 	// Draw a thin frame around us.
-	gui->hline(_x, _y, _x + _w - 1, gui->_color);
-	gui->hline(_x, _y + _h - 1, _x +_w - 1, gui->_shadowcolor);
-	gui->vline(_x, _y, _y + _h - 1, gui->_color);
-	gui->vline(_x + _w - 1, _y, _y + _h - 1, gui->_shadowcolor);
+	gui->hLine(_x, _y, _x + _w - 1, gui->_color);
+	gui->hLine(_x, _y + _h - 1, _x +_w - 1, gui->_shadowcolor);
+	gui->vLine(_x, _y, _y + _h - 1, gui->_color);
+	gui->vLine(_x + _w - 1, _y, _y + _h - 1, gui->_shadowcolor);
 
 	// Draw the text
 	adjustOffset();
@@ -182,7 +182,7 @@
 	int width = getCaretPos();
 	x += width;
 
-	gui->vline(x, y, y + kLineHeight, color);
+	gui->vLine(x, y, y + kLineHeight, color);
 	gui->addDirtyRect(x, y, 2, kLineHeight);
 
 	_caretVisible = !erase;

Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ListWidget.cpp	30 Apr 2003 13:57:54 -0000	1.23
+++ ListWidget.cpp	1 Oct 2003 15:00:24 -0000	1.24
@@ -258,9 +258,9 @@
 	ScummVM::String buffer;
 
 	// Draw a thin frame around the list.
-	gui->hline(_x, _y, _x + _w - 1, gui->_color);
-	gui->hline(_x, _y + _h - 1, _x + _w - 1, gui->_shadowcolor);
-	gui->vline(_x, _y, _y + _h - 1, gui->_color);
+	gui->hLine(_x, _y, _x + _w - 1, gui->_color);
+	gui->hLine(_x, _y + _h - 1, _x + _w - 1, gui->_shadowcolor);
+	gui->vLine(_x, _y, _y + _h - 1, gui->_color);
 
 	// Draw the list items
 	for (i = 0, pos = _currentPos; i < _entriesPerPage && pos < len; i++, pos++) {
@@ -310,7 +310,7 @@
 
 	x += gui->getStringWidth(buffer);
 
-	gui->vline(x, y, y+kLineHeight, color);
+	gui->vLine(x, y, y+kLineHeight, color);
 	gui->addDirtyRect(x, y, 2, kLineHeight);
 	
 	_caretVisible = !erase;

Index: PopUpWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- PopUpWidget.cpp	24 Sep 2003 06:29:47 -0000	1.16
+++ PopUpWidget.cpp	1 Oct 2003 15:00:24 -0000	1.17
@@ -109,10 +109,10 @@
 
 void PopUpDialog::drawDialog() {
 	// Draw the menu border
-	_gui->hline(_x, _y, _x+_w - 1, _gui->_color);
-	_gui->hline(_x, _y + _h - 1, _x + _w - 1, _gui->_shadowcolor);
-	_gui->vline(_x, _y, _y+_h - 1, _gui->_color);
-	_gui->vline(_x + _w - 1, _y, _y + _h - 1, _gui->_shadowcolor);
+	_gui->hLine(_x, _y, _x+_w - 1, _gui->_color);
+	_gui->hLine(_x, _y + _h - 1, _x + _w - 1, _gui->_shadowcolor);
+	_gui->vLine(_x, _y, _y+_h - 1, _gui->_color);
+	_gui->vLine(_x + _w - 1, _y, _y + _h - 1, _gui->_shadowcolor);
 
 	// Draw the entries
 	int count = _popUpBoss->_entries.size();
@@ -256,8 +256,8 @@
 	_gui->fillRect(x, y, w, kLineHeight, hilite ? _gui->_textcolorhi : _gui->_bgcolor);
 	if (name.size() == 0) {
 		// Draw a seperator
-		_gui->hline(x, y + kLineHeight / 2, x + w - 1, _gui->_color);
-		_gui->hline(x + 1, y + 1 + kLineHeight / 2, x + w - 1, _gui->_shadowcolor);
+		_gui->hLine(x, y + kLineHeight / 2, x + w - 1, _gui->_color);
+		_gui->hLine(x + 1, y + 1 + kLineHeight / 2, x + w - 1, _gui->_shadowcolor);
 	} else {
 		_gui->drawString(name, x + 1, y + 2, w - 2, hilite ? _gui->_bgcolor : _gui->_textcolor);
 	}
@@ -319,10 +319,10 @@
 
 	// Draw a thin frame around us.
 	// TODO - should look different than the EditTextWidget fram
-	gui->hline(_x, _y, _x + _w - 1, gui->_color);
-	gui->hline(_x, _y +_h-1, _x + _w - 1, gui->_shadowcolor);
-	gui->vline(_x, _y, _y+_h-1, gui->_color);
-	gui->vline(_x + _w - 1, _y, _y +_h - 1, gui->_shadowcolor);
+	gui->hLine(_x, _y, _x + _w - 1, gui->_color);
+	gui->hLine(_x, _y +_h-1, _x + _w - 1, gui->_shadowcolor);
+	gui->vLine(_x, _y, _y+_h-1, gui->_color);
+	gui->vLine(_x + _w - 1, _y, _y +_h - 1, gui->_shadowcolor);
 
 	// Draw an arrow pointing down at the right end to signal this is a dropdown/popup
 	gui->drawBitmap(up_down_arrows, _x+_w - 10, _y+2, !isEnabled() ? gui->_color : hilite ? gui->_textcolorhi : gui->_textcolor);

Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- console.cpp	24 Sep 2003 06:29:47 -0000	1.33
+++ console.cpp	1 Oct 2003 15:00:25 -0000	1.34
@@ -98,7 +98,7 @@
 	_gui->blendRect(_x, _y, _w, _h, _gui->_bgcolor, 2);
 
 	// Draw a border
-	_gui->hline(_x, _y + _h - 1, _x + _w - 1, _gui->_color);
+	_gui->hLine(_x, _y + _h - 1, _x + _w - 1, _gui->_color);
 
 	// Draw text
 	int start = _scrollLine - _linesPerPage + 1;

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- newgui.cpp	24 Sep 2003 06:29:47 -0000	1.61
+++ newgui.cpp	1 Oct 2003 15:00:26 -0000	1.62
@@ -286,15 +286,15 @@
 	NewGuiColor colorA = inverted ? _shadowcolor : _color;
 	NewGuiColor colorB = inverted ? _color : _shadowcolor;
 
-	hline(x + 1, y, x + width - 2, colorA);
-	hline(x, y + 1, x + width - 1, colorA);
-	vline(x, y + 1, y + height - 2, colorA);
-	vline(x + 1, y, y + height - 1, colorA);
+	hLine(x + 1, y, x + width - 2, colorA);
+	hLine(x, y + 1, x + width - 1, colorA);
+	vLine(x, y + 1, y + height - 2, colorA);
+	vLine(x + 1, y, y + height - 1, colorA);
 
-	hline(x + 1, y + height - 2, x + width - 1, colorB);
-	hline(x + 1, y + height - 1, x + width - 2, colorB);
-	vline(x + width - 1, y + 1, y + height - 2, colorB);
-	vline(x + width - 2, y + 1, y + height - 1, colorB);
+	hLine(x + 1, y + height - 2, x + width - 1, colorB);
+	hLine(x + 1, y + height - 1, x + width - 2, colorB);
+	vLine(x + width - 1, y + 1, y + height - 2, colorB);
+	vLine(x + width - 2, y + 1, y + height - 1, colorB);
 }
 
 void NewGui::line(int x, int y, int x2, int y2, NewGuiColor color) {

Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- newgui.h	6 Sep 2003 20:21:54 -0000	1.27
+++ newgui.h	1 Oct 2003 15:00:26 -0000	1.28
@@ -27,8 +27,8 @@
 
 class Dialog;
 
-#define hline(x, y, x2, color) line(x, y, x2, y, color);
-#define vline(x, y, y2, color) line(x, y, x, y2, color);
+#define hLine(x, y, x2, color) line(x, y, x2, y, color);
+#define vLine(x, y, y2, color) line(x, y, x, y2, color);
 
 // Height of a single text line
 enum {





More information about the Scummvm-git-logs mailing list