SAGA2: Rename enums in button.h

This commit is contained in:
Eugene Sandulenko 2022-10-27 13:37:08 +02:00
parent aaa2f0a009
commit 438a0b2c81
No known key found for this signature in database
GPG key ID: 014D387312D34F08
5 changed files with 29 additions and 29 deletions

View file

@ -191,7 +191,7 @@ void GfxCompImage::pointerMove(gPanelMessage &msg) {
// call the superclass's pointerMove // call the superclass's pointerMove
gControl::pointerMove(msg); gControl::pointerMove(msg);
notify(gEventMouseMove, (msg._pointerEnter ? enter : 0) | (msg._pointerLeave ? leave : 0)); notify(gEventMouseMove, (msg._pointerEnter ? kEnter : 0) | (msg._pointerLeave ? kLeave : 0));
} }
void GfxCompImage::enable(bool abled) { void GfxCompImage::enable(bool abled) {

View file

@ -115,8 +115,8 @@ protected:
public: public:
enum controlValue { enum controlValue {
enter = (1 << 0), kEnter = (1 << 0),
leave = (1 << 1) kLeave = (1 << 1)
}; };
GfxCompImage(gPanelList &, const Rect16 &, void *, uint16, AppFunc *cmd = NULL); GfxCompImage(gPanelList &, const Rect16 &, void *, uint16, AppFunc *cmd = NULL);

View file

@ -1861,7 +1861,7 @@ APPFUNC(cmdMindContainerFunc) {
g_vm->_mouseInfo->setText(textBuffer); g_vm->_mouseInfo->setText(textBuffer);
} }
if (ev.value == GfxCompImage::leave) { if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -1883,9 +1883,9 @@ APPFUNC(cmdCloseButtonFunc) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
g_vm->_mouseInfo->setText(CLOSE_MOUSE); g_vm->_mouseInfo->setText(CLOSE_MOUSE);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -1903,9 +1903,9 @@ APPFUNC(cmdScrollFunc) {
cw->scrollDown(); cw->scrollDown();
ev.window->update(cw->getView().getExtent()); ev.window->update(cw->getView().getExtent());
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
g_vm->_mouseInfo->setText(SCROLL_MOUSE); g_vm->_mouseInfo->setText(SCROLL_MOUSE);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }

View file

@ -2124,7 +2124,7 @@ APPFUNC(cmdPortrait) {
case gEventMouseMove: case gEventMouseMove:
if (ev.value == GfxCompImage::leave) { if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
g_vm->_mouseInfo->setDoable(true); g_vm->_mouseInfo->setDoable(true);
break; break;
@ -2200,12 +2200,12 @@ APPFUNC(cmdAggressive) {
// } // }
// else setAggression( transBroID, !wasAggressive ); // else setAggression( transBroID, !wasAggressive );
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
// set the text in the cursor // set the text in the cursor
g_vm->_mouseInfo->setText(isAggressive(transBroID) g_vm->_mouseInfo->setText(isAggressive(transBroID)
? ON_AGRESS ? ON_AGRESS
: OFF_AGRESS); : OFF_AGRESS);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2233,7 +2233,7 @@ APPFUNC( cmdJump )
APPFUNC(cmdArmor) { APPFUNC(cmdArmor) {
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
gArmorIndicator *gai = (gArmorIndicator *)ev.panel; gArmorIndicator *gai = (gArmorIndicator *)ev.panel;
char buf[128]; char buf[128];
@ -2250,7 +2250,7 @@ APPFUNC(cmdArmor) {
// set the text in the cursor // set the text in the cursor
g_vm->_mouseInfo->setText(buf); g_vm->_mouseInfo->setText(buf);
} }
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2265,12 +2265,12 @@ APPFUNC(cmdCenter) {
else setCenterBrother(transBroID); else setCenterBrother(transBroID);
} }
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
// set the text in the cursor // set the text in the cursor
g_vm->_mouseInfo->setText(getCenterActorPlayerID() == transBroID g_vm->_mouseInfo->setText(getCenterActorPlayerID() == transBroID
? ON_CENTER ? ON_CENTER
: OFF_CENTER); : OFF_CENTER);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2299,12 +2299,12 @@ APPFUNC(cmdBand) {
// } // }
// else setBanded( transBroID, !wasBanded ); // else setBanded( transBroID, !wasBanded );
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
// set the text in the cursor // set the text in the cursor
g_vm->_mouseInfo->setText(isBanded(transBroID) g_vm->_mouseInfo->setText(isBanded(transBroID)
? ON_BANDED ? ON_BANDED
: OFF_BANDED); : OFF_BANDED);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2315,8 +2315,8 @@ APPFUNC(cmdOptions) {
OptionsDialog(); OptionsDialog();
//openOptionsPanel(); //openOptionsPanel();
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) g_vm->_mouseInfo->setText(OPTIONS_PANEL); if (ev.value == GfxCompImage::kEnter) g_vm->_mouseInfo->setText(OPTIONS_PANEL);
else if (ev.value == GfxCompImage::leave) g_vm->_mouseInfo->setText(nullptr); else if (ev.value == GfxCompImage::kLeave) g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2335,7 +2335,7 @@ APPFUNC(cmdBroChange) {
uint16 panID = ev.panel->_id; uint16 panID = ev.panel->_id;
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
// working buffer // working buffer
char buf[bufSize]; char buf[bufSize];
char state[stateBufSize]; char state[stateBufSize];
@ -2356,7 +2356,7 @@ APPFUNC(cmdBroChange) {
} }
// set the text in the cursor // set the text in the cursor
g_vm->_mouseInfo->setText(buf); g_vm->_mouseInfo->setText(buf);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2366,12 +2366,12 @@ APPFUNC(cmdHealthStar) {
uint16 transBroID = translatePanID(ev.panel->_id); uint16 transBroID = translatePanID(ev.panel->_id);
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::leave) { if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
return; return;
} }
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
ev.panel->setMousePoll(true); ev.panel->setMousePoll(true);
} }
@ -2391,7 +2391,7 @@ APPFUNC(cmdMassInd) {
GameObject *_containerObject = nullptr; GameObject *_containerObject = nullptr;
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
const int bufSize = 40; const int bufSize = 40;
int curWeight; int curWeight;
uint16 baseWeight; uint16 baseWeight;
@ -2417,7 +2417,7 @@ APPFUNC(cmdMassInd) {
g_vm->_mouseInfo->setText(buf); g_vm->_mouseInfo->setText(buf);
} else } else
g_vm->_mouseInfo->setText(UNK_WEIGHT_HINT); g_vm->_mouseInfo->setText(UNK_WEIGHT_HINT);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2429,7 +2429,7 @@ APPFUNC(cmdBulkInd) {
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::enter) { if (ev.value == GfxCompImage::kEnter) {
const int bufSize = 40; const int bufSize = 40;
uint16 baseBulk = 100; uint16 baseBulk = 100;
char buf[bufSize]; char buf[bufSize];
@ -2455,7 +2455,7 @@ APPFUNC(cmdBulkInd) {
g_vm->_mouseInfo->setText(buf); g_vm->_mouseInfo->setText(buf);
} else } else
g_vm->_mouseInfo->setText(UNK_BULK_HINT); g_vm->_mouseInfo->setText(UNK_BULK_HINT);
} else if (ev.value == GfxCompImage::leave) { } else if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} }
} }
@ -2463,7 +2463,7 @@ APPFUNC(cmdBulkInd) {
APPFUNC(cmdManaInd) { APPFUNC(cmdManaInd) {
if (ev.eventType == gEventMouseMove) { if (ev.eventType == gEventMouseMove) {
if (ev.value != GfxCompImage::leave) { if (ev.value != GfxCompImage::kLeave) {
const int BUF_SIZE = 64; const int BUF_SIZE = 64;
char textBuffer[BUF_SIZE]; char textBuffer[BUF_SIZE];
int manaType = -1; int manaType = -1;

View file

@ -4386,7 +4386,7 @@ APPFUNC(cmdBrain) {
} }
} }
} else if (ev.eventType == gEventMouseMove) { } else if (ev.eventType == gEventMouseMove) {
if (ev.value == GfxCompImage::leave) { if (ev.value == GfxCompImage::kLeave) {
g_vm->_mouseInfo->setText(nullptr); g_vm->_mouseInfo->setText(nullptr);
} else { //if (ev.value == gCompImage::enter) } else { //if (ev.value == gCompImage::enter)
// set the text in the cursor // set the text in the cursor