Skip to content

NativeUI.openMenu: a client script opens the game's inventory, Player or map page - #335

Closed
Kharote wants to merge 1 commit into
mainfrom
feat/native-ui-open-menu
Closed

Kharote wants to merge 1 commit into
mainfrom
feat/native-ui-open-menu

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

During a NoClip flight KCDS keeps the game's keys, so M never reaches the game and a script had no way to open the map: NativeUI could only disable pages.

  • New client NativeUI.openMenu(menu): opens a page of the game's menu as its key does (the page's own key callback, with the inventory screen's owner). inventory, player and map are the pages whose keys the game has; others open only where the game has a callback for them. It goes through the page gate, so a page a resource disabled stays closed, and it returns false then.
  • New native_ui/menu_pages.{hpp,cpp}: the page open and close, shared with the test kit's scripted steps (open_inventory_screen, open_map_screen, open_player_screen, close_inventory_screen), which had their own copies.
  • Docs: NativeUI.openMenu (since 1.2.1), C# SDK regenerated.

How it was tested

  • client_native_ui.test.cjs: openMenu sends the page, refuses a disabled one, throws for an unknown name; 14 pass.
  • Kit, one game: a client script started a NoClip flight, then NativeUI.openMenu('map'): the client logged the page opened, and NativeUI.openScreens() listed ApseMap, ApseMapLegendList and the others 4 s later.

Checklist

  • I read CONTRIBUTING.md and agree that my contribution is licensed as it says.
  • The change is my own work: no code, assets or dumps that are not mine or that come from the game.
  • python Dev/tools/format_source.py --check passes.
  • Tests cover the change, and the checks of this pull request pass.
  • Public behaviour that changed is documented (KCD-Synced/KCDS-DOCS) or needs no docs.

@Kharote
Kharote marked this pull request as ready for review November 24, 2026 10:55
@Kharote Kharote mentioned this pull request Nov 24, 2026
5 tasks done
@Kharote

Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Shipped in 1.2.1 (#349, release v1.2.1).

@Kharote Kharote closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant