From 745497dea4cc3d0698d48338c4c7f06eac6769c3 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 1 Oct 2003 15:00:26 +0000 Subject: 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 svn-id: r10520 --- gui/EditTextWidget.cpp | 10 +++++----- gui/ListWidget.cpp | 8 ++++---- gui/PopUpWidget.cpp | 20 ++++++++++---------- gui/console.cpp | 2 +- gui/newgui.cpp | 18 +++++++++--------- gui/newgui.h | 4 ++-- 6 files changed, 31 insertions(+), 31 deletions(-) (limited to 'gui') diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp index 82eb2b4c22..7807683978 100644 --- a/gui/EditTextWidget.cpp +++ b/gui/EditTextWidget.cpp @@ -147,10 +147,10 @@ void EditTextWidget::drawWidget(bool hilite) { 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 @@ void EditTextWidget::drawCaret(bool erase) { 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; diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 3efb7254aa..50f3a724e2 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -258,9 +258,9 @@ void ListWidget::drawWidget(bool hilite) { 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 @@ void ListWidget::drawCaret(bool erase) { 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; diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index ab08fc551c..bdff005297 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -109,10 +109,10 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY) 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 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) { _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 @@ void PopUpWidget::drawWidget(bool hilite) { // 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); diff --git a/gui/console.cpp b/gui/console.cpp index 815f6f5c1c..c0fa4c0843 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -98,7 +98,7 @@ void ConsoleDialog::drawDialog() { _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; diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 2bc9aacac0..b6f7808b24 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -286,15 +286,15 @@ void NewGui::box(int x, int y, int width, int height, bool inverted) { 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 + 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, 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); } void NewGui::line(int x, int y, int x2, int y2, NewGuiColor color) { diff --git a/gui/newgui.h b/gui/newgui.h index 69c5af4075..1f1012061f 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -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 { -- cgit v1.2.3