Skip to content

Commit

Permalink
Don't register scroll bar up and down buttons in the UI focus system
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jan 11, 2025
1 parent 4883a24 commit 56f099c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/xrUICore/ScrollBar/UIScrollBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ CUIScrollBar::CUIScrollBar()

m_FrameBackground->SetAutoDelete(true);
AttachChild(m_FrameBackground);

// All buttons are automatically registered
// but we don't need scrollbar buttons, since
// scrolling when using gamepad is to be handled
// by the parent of the scroll bar
auto& focus = UI().Focus();
focus.UnregisterFocusable(m_DecButton);
focus.UnregisterFocusable(m_IncButton);
}

bool CUIScrollBar::InitScrollBar(Fvector2 pos, float length, bool bIsHorizontal, cpcstr profile)
Expand Down

0 comments on commit 56f099c

Please sign in to comment.