MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / PollWheelScroll

Method PollWheelScroll

engine/Poseidon/UI/Options/OptionsScrollList.cpp:789–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787 m_host.FocusCtrl(SlotIdcHover(slot));
788}
789
790void OptionsScrollList::EnsureFocusVisible()
791{
792 // Pinned rows are always visible; only content rows need scroll
793 // adjustment.
794 int pinned = m_provider.PinnedFooterRow();
795 if (pinned >= 0 && m_rowFocus == pinned)
796 return;
797 int adjusted = (pinned >= 0 && m_rowFocus > pinned) ? (m_rowFocus - 1) : m_rowFocus;
798 int contentSlots = ContentSlots();
799 if (adjusted < m_scrollOffset)
800 m_scrollOffset = adjusted;
801 else if (adjusted >= m_scrollOffset + contentSlots)
802 m_scrollOffset = adjusted - (contentSlots - 1);
803}

Callers

nothing calls this directly

Calls 1

ConsumeCursorScrollMethod · 0.80

Tested by

no test coverage detected