sourcemod
sourcemod copied to clipboard
Add a way to get the current page in a menu
There is currently no reliable way to get the current page a client is viewing for a Menu
outside of Menu.Selection
that only works in the MenuAction_Select
callback.
For some applications, we would like to know the page or first item on the page like Menu.Selection
provided when the client is simply flipping through menu pages with Next
and Back
. For example, to refresh values on a menu and seamlessly show it back to the client viewing it by using Menu.DisplayAt
to jump back to the same page.
This looks like it'll just be a case of exposing player->states.item_on_page
, and it looks like the best way to expose that will be to extend GetClientMenu
(see also #1552).