Skip to main content

Crate flatland_client_ui

Crate flatland_client_ui 

Source
Expand description

Engine-agnostic play client UI (world grid, input, presentation).

Structs§

HudLayout
KeyBinding
KeyBindingCategory
MapLegendEntry
One row in the ? help map legend (glyphs from YAML catalogs).
MapPresentation
MapTargetState
MovementState
Keyboard movement state.
NormRect
PlayHud
RgbColor
UiKeyEvent
UiKeyModifiers
WorldView
The TUI map uses one terminal cell per world meter on both axes so terrain, entities, resources, and mouse targeting share the same grid. Terminal fonts are taller than wide, so buildings look vertically stretched compared to the content-admin editor.
WorldViewOptions
Presentation flags for WorldView::build_with_options.

Enums§

ActiveOverlay
Which modal overlay is open (if any).
CombatKeyAction
HudViewMode
Play-client HUD density: normal sidebar, compact essentials, or map-first.
InputAction
MovementInput
UiKeyCode
UiKeyEventKind
UiMouseButton
UiPointerEvent

Constants§

CATEGORIES
EDITOR_ABILITIES
Fallback open-kit abilities when the character has no known abilities yet.
MOVEMENT_IDLE_TIMEOUT
Fallback stop window when the terminal omits key-release events. Must exceed typical OS key-repeat initial delay (~500ms) so a held key that only refreshes via repeat does not stutter to a stop.

Functions§

chest_presentation
combat_action_for_key
corpse_presentation
door_presentation
editor_ability_choices
Abilities shown in the rotation-editor picker: known (+ weapon), else fallback kit.
entity_fallback
format_keybindings_plain
Plain-text reference for flatland3 keys and similar CLIs.
format_map_legend_plain
grid_to_world
Inverse of [world_to_grid]: map view cell → world meters (cell center).
hud_layout
interior_door_display_xy
Door/stair sprite position: attach to the shared wall between rooms (or perimeter fallback).
interior_wall_glyph_line
Grid row/column for the wall glyph at fixedround so the glyph lands on the cell that actually contains the sim’s blocking strip (matches collision).
key_matches
loot_presentation
map_legend_entries
Map legend rows for help overlay and flatland3 keys.
maybe_reload_for_content_rev
Reload presentation YAML when the sim reports a newer content revision (after publish).
next_custom_preset
npc_for
parse_color
player_presentation
preset_deletable
quest_board_presentation
reload_map_presentation_catalog
Reload terrain-kinds.yaml, map-glyphs.yaml, and item glyphs from disk.
resource_for
shallow_water_presentation
terrain_for
terrain_for_elevation
Terrain glyph + color from zone kind and ground elevation (topographic read).
terrain_for_zone
Terrain presentation for a zone cell, applying optional per-zone glyph/color overrides from YAML.
wall_presentation
well_center_presentation