Skip to content

User Interface ​

The interface of a ChronicleNode game is made of scenes. The toolkit ships a template for every part, in res://addons/chroniclenode/ui_scenes/. You can use them as they are, change them, or build your own: the game does not care what a scene looks like, only that its root is of the right class and that the parts it expects are inside.

This chapter is about the scenes. The settings that point the game at them (and the cursors and map icons) are on the UI Settings page of the editor.

The parts ​

PartWhat it isPage
Splash and loading screenWhat the player sees while the game starts and while a level loadsLoading Screen
Main menuPlay, Continue, Load, Settings, Credits, ExitMain Menu
Character creationWhere the player makes a heroCharacter Creation screen
In gameEverything the player sees while playing: the HUD, the windows of interactions and the windows the player opensIn Game
HUDThe always-on parts: action bar, party frames, minimap, quest tracker, combat logHUD
Action barHow the bar is built, drawn and hooked upAction bar
Interaction panelsThe window of an interaction: a conversation, a shop, a crafting station, a chestInteraction Panels
UI panelsThe windows the player opens: character, spellbook, quest logUI Panels
TooltipsThe pop-ups for items, abilities, effects, skill nodes and plain textTooltips
NameplatesThe bar over the head of an entity or an objectNameplates
Messages and popupsThe short messages at the top of the screen and the popups of your storyMessages and popups

The scenes the game loads ​

The game loads one of three scenes as the interface, depending on where the player is. The scenes are set in UI Settings.

State of the gameSceneRoot class
The main menuMain menu sceneMainMenu (or any CurrentUI)
Making a characterCharacter creation sceneany CurrentUI, in practice CharacterCreationUI
PlayingIn game sceneInGameUI

Next to these, the game also creates, once, whatever the state:

SceneRoot classWhat it is
Loading screenLoadingScreenCovers the screen while scenes load
NameplateNameplateOne is made for every entity and object that has a nameplate
Tooltips (five)TooltipItem, TooltipAbility, TooltipEffect, TooltipSkillNode, TooltipDescriptionThe pop-ups

The root must be the right class

Each of these scenes must have a script of the right class on its root node. The game calls the methods of that class. A scene whose root is a plain Control loads, but nothing works.

The UI Settings editor checks this for you and says which scene has the wrong root, and validate() of the settings reports it too.

A root can be a subclass of the class: your own class_name MyInGameUI extends InGameUI is fine, and is the way to change what the in-game interface does (see In Game).

The system hub ​

Every part of the interface is handed the system hub when it starts: initialize_ui(system_hub). The hub holds every manager of the game (the party, the combat, the quests, the audio, the world), so a part of the interface can read what it needs and connect to the signals it wants without searching for them. That is the whole way to hook your own elements up, see HUD.

Scaling and mouse clicks ​

  • UI scale (a player's option) scales the HUD elements and the windows. A HUD element can opt out with Affected by UI scaling.
  • A control decides if a click reaches the world with its mouse filter. A window or button that must block the world uses Stop; a container or a full-screen layer uses Ignore (or Pass). A full-screen root left at the default Stop swallows every click on the world.

See also ​