DEKI/ENGINE docs
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiEditor::EditorNaming Namespace Reference

Functions

std::string NicifyName (const char *name)
 Turns camelCase, PascalCase, snake_case or kebab-case into "Title Case": "topColor" -> "Top Color", "scroll_speed" -> "Scroll Speed", "dirt-a" -> "Dirt A".
const std::string & GetDisplayName (const Deki::PropertyInfo &prop)
 The label for a property: its displayName if set, else its nicified name.
void ClearDisplayNameCache ()
 Forgets cached display names.

Function Documentation

◆ NicifyName()

std::string DekiEditor::EditorNaming::NicifyName ( const char * name)

Turns camelCase, PascalCase, snake_case or kebab-case into "Title Case": "topColor" -> "Top Color", "scroll_speed" -> "Scroll Speed", "dirt-a" -> "Dirt A".

◆ GetDisplayName()

const std::string & DekiEditor::EditorNaming::GetDisplayName ( const Deki::PropertyInfo & prop)

The label for a property: its displayName if set, else its nicified name.

Cached per Deki::PropertyInfo, since the Inspector asks for every visible property every frame and the answer depends only on a static table entry.

◆ ClearDisplayNameCache()

void DekiEditor::EditorNaming::ClearDisplayNameCache ( )

Forgets cached display names.

Call when package DLLs unload: their property tables (the cache keys) go with them, and an address can be reused.