sourcemod icon indicating copy to clipboard operation
sourcemod copied to clipboard

Add a way to get the current page in a menu

Open geominorai opened this issue 3 years ago • 1 comments

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.

geominorai avatar Jul 28 '21 13:07 geominorai

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).

asherkin avatar Jul 28 '21 14:07 asherkin