Skip to content

[FEATURE] Add page navigation support to IMenuAPI #306

@2oaJ

Description

@2oaJ

Problem Description

IMenuAPI currently supports menu options and selection movement, but it does not appear to provide built-in page navigation for menus with many options.

When a menu contains a large number of entries, players have to move through the list one option at a time. This becomes painful for long menus such as admin tools, item lists, map lists, player lists, shop menus, or configuration menus.

The menu system should provide first-class pagination support.

Suggested behavior:

  • Add two menu input buttons:
    • Previous page
    • Next page
  • Allow menus to define which button trigger page navigation.
  • Jumping to the previous or next page should update the selected option to a sensible position on the target page.
  • Page navigation should work consistently with existing option selection and click handling.
  • Menus with fewer options than one page should keep the current behavior.
  • Parent / child menu behavior should not be affected.

The menu title should also expose page information when pagination is active.

Proposed Solution

var menu = Core.Menus.CreateBuilder()
    .Design.SetMenuTitle("Weapon Menu")
    .Design.SetMaxVisibleItems(5)
    .Design.SetPageSize(5)
    .SetPreviousPageButton(...)
    .SetNextPageButton(...)
    .ShowPageInfoInTitle(true)
    .Build();

Alternative Solutions

1

Use Case

  • Existing menus keep working without changes.
  • Pagination is optional and can be enabled per menu.
  • When enabled, the framework handles page state internally.
  • The menu title includes the current page and total page count.
  • Plugin authors do not need to manually split large option lists into multiple submenus.

This would make large menus much easier to use and would keep pagination behavior consistent across plugins.

Implementation Ideas

1

Priority

Low

Contribution

  • I'm willing to implement this feature myself
  • I can help with testing
  • I can help with documentation
  • I can provide feedback during development

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions