Skip to content

Commit 9c6f142

Browse files
committed
cleanup
1 parent eedd803 commit 9c6f142

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/Entities/PieMenu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,16 @@ void PieMenu::Update() {
558558

559559
bool anyInput = false;
560560
bool skipInputBecauseActiveSubPieMenuWasJustDisabled = false;
561+
561562
if (m_ActiveSubPieMenu) {
562563
m_CursorAngle = m_HoveredPieSlice->GetMidAngle() + GetRotAngle();
563564
m_CursorInVisiblePosition = false;
564565
m_HoverTimer.Reset();
566+
565567
if (m_ActiveSubPieMenu->IsVisible()) {
566568
m_ActiveSubPieMenu->Update();
567569
}
570+
568571
if (!m_ActiveSubPieMenu->IsEnabled()) {
569572
m_ActivatedPieSlice = m_ActiveSubPieMenu->m_ActivatedPieSlice;
570573
Directions activeSubPieMenuDirection = m_ActiveSubPieMenu->m_DirectionIfSubPieMenu;
@@ -576,6 +579,7 @@ void PieMenu::Update() {
576579
m_CursorInVisiblePosition = true;
577580
} else {
578581
bool shouldClearHoveredSlice = controller->IsState(ControlState::PIE_MENU_ACTIVE_ANALOG);
582+
579583
// If a keyboard-only sub-PieMenu is exited by going off the sides, the parent PieMenu should handle input so the next PieSlice can be naturally stepped to.
580584
if (activeSubPieMenuDirection != Directions::None) {
581585
for (const auto& [controlState, controlStateDirection]: c_ControlStateDirections) {
@@ -585,13 +589,15 @@ void PieMenu::Update() {
585589
}
586590
}
587591
}
592+
588593
if (shouldClearHoveredSlice) {
589594
SetHoveredPieSlice(nullptr);
590595
skipInputBecauseActiveSubPieMenuWasJustDisabled = true;
591596
}
592597
}
593598
}
594599
}
600+
595601
if (!m_ActiveSubPieMenu && !skipInputBecauseActiveSubPieMenuWasJustDisabled) {
596602
if (controller->IsState(PIE_MENU_ACTIVE_ANALOG)) {
597603
anyInput = HandleAnalogInput(controller->GetAnalogCursor());

0 commit comments

Comments
 (0)