aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2009-05-17 05:12:10 +0000
committerPaul Gilbert2009-05-17 05:12:10 +0000
commit3c45ee20eb6c12184da0756c0c189d82abb8bcab (patch)
tree439c1ef39225ed9b7713827d971bf7cefda4e480 /engines
parent4c2d4a453dce998d469fd164d60b07b29a60b2e1 (diff)
downloadscummvm-rg350-3c45ee20eb6c12184da0756c0c189d82abb8bcab.tar.gz
scummvm-rg350-3c45ee20eb6c12184da0756c0c189d82abb8bcab.tar.bz2
scummvm-rg350-3c45ee20eb6c12184da0756c0c189d82abb8bcab.zip
Properly named the dialog menu item 'selected' field
svn-id: r40632
Diffstat (limited to 'engines')
-rw-r--r--engines/cruise/cruise_main.cpp2
-rw-r--r--engines/cruise/mainDraw.cpp2
-rw-r--r--engines/cruise/menu.cpp6
-rw-r--r--engines/cruise/vars.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 1d6907ebf0..97681d9cac 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -774,7 +774,7 @@ menuElementSubStruct *getSelectedEntryInMenu(menuStruct *pMenu) {
pMenuElement = pMenu->ptrNextElement;
while (pMenuElement) {
- if (pMenuElement->varC) {
+ if (pMenuElement->selected) {
currentMenuElementX = pMenuElement->x;
currentMenuElementY = pMenuElement->y;
currentMenuElement = pMenuElement;
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 5d7ffe4ca0..be128a3ffb 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -1313,7 +1313,7 @@ void drawMenu(menuStruct *pMenu) {
int color;
- if (p1->varC) {
+ if (p1->selected) {
color = selectColor;
} else {
if (p1->color != 255) {
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 7246ec65b4..9b59494f96 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -101,7 +101,7 @@ void addSelectableMenuEntry(int ovlIdx, int headerIdx, menuStruct *pMenu, int pa
pNewElement->string = menuText;
pNewElement->next = NULL;
- pNewElement->varC = 0;
+ pNewElement->selected = false;
pNewElement->color = color;
pNewElement->gfx = renderText(160, menuText);
@@ -129,13 +129,13 @@ void updateMenuMouse(int mouseX, int mouseY, menuStruct *pMenu) {
menuElementStruct *pCurrentEntry = pMenu->ptrNextElement;
while (pCurrentEntry) {
- pCurrentEntry->varC = 0;
+ pCurrentEntry->selected = false;
if (var_2 == 0) {
if ((mouseX > pCurrentEntry->x) && ((pCurrentEntry->x + 160) >= mouseX)) {
if ((mouseY > pCurrentEntry->y) && ((pCurrentEntry->y + height) >= mouseY)) {
var_2 = 1;
- pCurrentEntry->varC = 1;
+ pCurrentEntry->selected = true;
}
}
}
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index cd0929e212..7208a8bea0 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -45,7 +45,7 @@ struct menuElementStruct {
int x;
int y;
int varA;
- int varC;
+ bool selected;
unsigned char color;
gfxEntryStruct *gfx;
menuElementSubStruct *ptrSub;