power_play/src/ui/ui_extras.h

34 lines
1.0 KiB
C

////////////////////////////////////////////////////////////
//~ Common resources
GC_FontKey UI_BuiltinTextFont(void);
GC_FontKey UI_BuiltinIconFont(void);
////////////////////////////////////////////////////////////
//~ Text helpers
UI_Key UI_BuildLabel(String text);
#define UI_BuildLabelF(fmt_cstr, ...) UI_BuildLabelF_(Lit(fmt_cstr), __VA_ARGS__, FmtEnd)
UI_Key UI_BuildLabelF_(String fmt, ...);
////////////////////////////////////////////////////////////
//~ Icon helpers
UI_Key UI_BuildIconEx(UI_Key key, GC_FontKey font, UI_Icon icon);
#define UI_BuildIcon(font, icon) UI_BuildIconEx(UI_NilKey, (font), (icon))
////////////////////////////////////////////////////////////
//~ Spacing helpers
UI_Key UI_BuildSpacer(UI_Size size, Axis axis);
UI_Key UI_BuildDivider(UI_Size size, Vec4 color, Axis axis);
////////////////////////////////////////////////////////////
//~ Layout helpers
UI_Key UI_BuildRowEx(UI_Key key);
UI_Key UI_BuildColumnEx(UI_Key key);
#define UI_BuildRow() UI_BuildRowEx(UI_NilKey)
#define UI_BuildColumn() UI_BuildColumnEx(UI_NilKey)