interface - ryzom/ryzomcore GitHub Wiki


title: Interface description: Creating user interfaces with the NeL GUI system, using XML, database, action handlers and Lua published: true editor: markdown

The NeL interface system is a data-driven GUI: windows, widgets, layout, styling, game-data bindings and most behavior are described in XML interface files, reactive state lives in an interface database, behavior hooks are action handlers and Lua scripts. The C++ engine (the NeL GUI library) parses the XML, renders everything from a texture atlas, and routes input. A complete UI, including whole mini-applications, can be authored without touching engine code.

This section is for anyone building a UI: interface authors, scripters, and programmers. The library internals and the embedding contract for new applications are documented separately under NeL GUI.

The nl_sample_gui widget showcase: launcher, views, buttons, sliders, edit boxes, list and tree, menus, tabs, color picker and a contacts rollout, all on the legacy w_ skin

Everything on this page tree is verified against the GUI widget sample (nel/samples/gui/), a standalone showcase you can run natively or in the browser. It is the quickest way to experiment: nl_sample_gui --xml your_file.xml -d your_data_dir parses extra interface XML on top of the showcase.

The mental model

  • Everything on screen is an element in one tree: groups contain views (display-only), controls (interactive) and other groups. Every element has an id; full ids are colon paths like ui:sample:editors:content:eb_text.
  • Windows are groups registered on a master group (<root id="sample">ui:sample). Only registered windows draw; a stray group at the root parses fine and renders never.
  • Position is relative: each element pins one of its nine hotspots to a hotspot of its parent (or any named sibling). There is no layout engine re-flowing content; there are anchors, offsets, and size references. See Layout.
  • The interface database is a tree of 64-bit values (UI:..., SERVER:...). Widgets bind to leaves; <link> elements evaluate expressions when leaves change and write the result into element properties. See Database, links and expressions.
  • Action handlers are named C++ (or script-backed) commands wired to widget events (onclick_l="proc" params_l="proc_toggle|help"). Sequences of them are procedures. See Action handlers and procedures.
  • Lua sees every element as an object with reflected properties (ui('views').active = false) and can drive the whole interface at runtime. See Lua scripting.

Authoring guide

Reference

Historical: the GUI Editor OVQT plugin and old UI editing notes from the Atlassian archive; the client-side /loadui reload workflow described there still exists in the Ryzom client.

⚠️ **GitHub.com Fallback** ⚠️