Skip to content

docs: add web views, HUD, map markers and keys guides - #11

Merged
Kheartz merged 1 commit into
hogwarts-mp:mainfrom
Kheartz:ui
Oct 14, 2026
Merged

Kheartz merged 1 commit into
hogwarts-mp:mainfrom
Kheartz:ui

Conversation

@Kheartz

@Kheartz Kheartz commented Oct 14, 2026

Copy link
Copy Markdown
Member

Adds a User interface section (sidebar orders 60–69) with four guides, written for the published 1.8.2 release and checked against the v1.8.2 Mod source and its Framework pin:

  • Web views: shipping pages under files and loading them as fw://resources/<resource>/<path>, view options and lifetime, the callEvent / Web.on / Web.emit bridge with a ready handshake, focus and input, origin locking, and why player.showUI needs a ui resource that neither the release nor Foundations ships.
  • HUD, prompts and nametags: HUD groups and who holds them, the single interaction prompt, server nametag text, colour and visibility, client-side nametag switches and passing labels, and Game.notify.
  • Map markers: markers, circles (radius in metres), gold routes, player blips and colours, and Minimap.state() / minimapChanged. Blips belong to the client rather than the resource, so the guide shows the server keeping the set and replaying it to new players.
  • Keys and menus: Key.bind with the full list of key names (physical positions, US names), when bindings are suppressed, Game.lockControls, and the Field Guide, page, action screen and tool wheel holds.

The overview lists the new section and the README records its order range.

scripts/check_samples.mjs now also ignores TS2584, the "change your target library" form of a missing lowercase name. It is what a page script's document produces, so it falls under the same rule as other lowercase names the reader's own code provides. The generator rejects <script> and <button> anywhere in a guide, so the web-view example shows the page's script as its own file rather than an HTML listing.

Checks: check_samples (86 samples, 1.8.2 contract), docs.mjs build, check_links and git diff --check all pass.

New User interface section (orders 60-69), written against 1.8.2: web views and the page bridge, HUD groups, prompts and nametags, map blips, routes and the minimap, and key bindings, control locks and the game's menus. The sample checker now also ignores TS2584, the variant of a missing lowercase name that page globals such as document produce.
@Kheartz
Kheartz merged commit 5879e4e into hogwarts-mp:main Oct 14, 2026
1 check passed
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