mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
Properly named the dialog menu item 'selected' field
svn-id: r40632
This commit is contained in:
parent
4c2d4a453d
commit
3c45ee20eb
@ -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;
|
||||
|
@ -1313,7 +1313,7 @@ void drawMenu(menuStruct *pMenu) {
|
||||
|
||||
int color;
|
||||
|
||||
if (p1->varC) {
|
||||
if (p1->selected) {
|
||||
color = selectColor;
|
||||
} else {
|
||||
if (p1->color != 255) {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ struct menuElementStruct {
|
||||
int x;
|
||||
int y;
|
||||
int varA;
|
||||
int varC;
|
||||
bool selected;
|
||||
unsigned char color;
|
||||
gfxEntryStruct *gfx;
|
||||
menuElementSubStruct *ptrSub;
|
||||
|
Loading…
x
Reference in New Issue
Block a user