MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / GetLeftStickOrDPadGameUIHandler

Function GetLeftStickOrDPadGameUIHandler

Source/controls/plrctrls.cpp:1422–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1420using HandleLeftStickOrDPadFn = void (*)(devilution::AxisDirection);
1421
1422HandleLeftStickOrDPadFn GetLeftStickOrDPadGameUIHandler()
1423{
1424 if (IsStashOpen) {
1425 return &StashMove;
1426 }
1427 if (invflag) {
1428 return &CheckInventoryMove;
1429 }
1430 if (chrflag && MyPlayer->_pStatPts > 0) {
1431 return &AttrIncBtnSnap;
1432 }
1433 if (spselflag) {
1434 return &HotSpellMove;
1435 }
1436 if (sbookflag) {
1437 return &SpellBookMove;
1438 }
1439 if (QuestLogIsOpen) {
1440 return &QuestLogMove;
1441 }
1442 if (stextflag != TalkID::None) {
1443 return &StoreMove;
1444 }
1445 return nullptr;
1446}
1447
1448void ProcessLeftStickOrDPadGameUI()
1449{

Callers 3

MovementFunction · 0.85
IsMovementHandlerActiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected