MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / GUI_Element_Mouse_Over

Method GUI_Element_Mouse_Over

Source/GUI_Element.cpp:1432–1465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430}
1431
1432void cFodder::GUI_Element_Mouse_Over(const sGUI_Element *pElement) {
1433 for (;; ++pElement) {
1434 const sGUI_Element* Data20 = pElement;
1435
1436 if (Data20->field_0 == 0)
1437 break;
1438
1439 if ((*this.*Data20->field_0)() < 0)
1440 return;
1441
1442 int16 Data0 = Data20->mX;
1443
1444 int16 Data4 = mMouseX + 0x20;
1445
1446 if (Data0 > Data4)
1447 continue;
1448
1449 Data0 += Data20->mWidth;
1450 if (Data0 < Data4)
1451 continue;
1452
1453 Data0 = mGUI_Mouse_Modifier_Y;
1454 Data0 += Data20->mY;
1455 if (Data0 > mMouseY)
1456 continue;
1457
1458 Data0 += Data20->mHeight;
1459 if (Data0 < mMouseY)
1460 continue;
1461
1462 (*this.*Data20->mMouseInsideFuncPtr)();
1463 return;
1464 }
1465}
1466
1467void cFodder::GUI_Button_SelectMap0() {
1468 mGame_Data.mMission_Number = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected