codebase-ui

Map player input to game actions and render context-sensitive UI screens.

Updated Dec 13, 2025
One-click install
npx skills add https://github.com/EliasVahlberg/saltglass-steppe --skill codebase-ui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-ui
Source: https://github.com/EliasVahlberg/saltglass-steppe/tree/main/.kiro_snapshot_2026-04-04_1209/skills/codebase-ui
Command: npx skills add https://github.com/EliasVahlberg/saltglass-steppe --skill codebase-ui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a single reference and integration point for managing UI screens, context-sensitive input, and the flow of UI state into game actions so developers can consistently add or modify interface elements without breaking render or input behavior.

Core Features & Use Cases

  • UiState centralization: A single UiState struct holds all menu and overlay states for predictable rendering and input handling.
  • Render priority and flow: Defines fullscreen menu early-returns, overlays, death screen, and main game view rendering order to avoid visual and interaction conflicts.
  • Input-to-Action mapping: Context-sensitive input handling converts keystrokes into Action variants for the game loop and supports menus, look mode, targeting, and debug commands.
  • Camera and overlays: Camera smoothing, dialog box lifecycle, tutorial messages, and modal focus rules simplify adding features like world map, inventory, and debug consoles.

Quick Start

Create a new UI screen by adding src/ui/my_screen.rs with state and render functions, add the state to UiState, register the module in src/ui/mod.rs, call the render with fullscreen early-return in main render, and implement input handling to emit appropriate Action variants.

Frequently Asked Questions about codebase-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new fullscreen menu to a Rust game UI without breaking existing render order?

To add a new Rust game UI menu, create a module with state and render functions, add it to the central UiState struct, and register it with an early-return in the main render flow to prevent visual conflicts.

What is the best way to map player keystrokes to game actions in a Rust UI subsystem?

Map player keystrokes to game actions using context-sensitive input handling that converts keyboard input into Action variants for the game loop, supporting menus, look mode, targeting, and debug commands.

How does centralized UI state management handle dialog boxes and modal overlays?

Centralized UI state management uses a single UiState struct to control dialog box lifecycles and enforce modal overlay focus rules, ensuring predictable rendering and interaction across all game interface elements.

Can I implement camera smoothing and tutorial messages using a centralized game UI state?

Yes, you can implement camera smoothing and tutorial messages by integrating them into the centralized UiState struct, which manages overlay behavior and context-specific rendering priorities.

Why do my game overlays conflict with the main view during rendering?

Overlays conflict with the main view when render priorities are undefined. Defining fullscreen early-returns, overlay layers, and main view rendering order prevents visual and interaction conflicts.

Does this Rust UI state management approach support both gameplay and debug modes?

Yes, this Rust UI state management approach supports both gameplay and debug modes by mapping context-sensitive inputs to Action variants that handle standard gameplay, look mode, targeting, and debug commands.