ff_i_nuibuilder
Build NUI windows with nested Start/End calls.
Each NUI_Start* call opens a node, each NUI_End closes it and inserts it
in its parent. NUI_Set* calls apply to the node currently open.
NUI_Add* calls open and close a leaf node in one go.
The build state is kept in local variables on OBJECT_SELF. Only one window
or layout can be built at a time.
To build a layout without a window, for NuiSetGroupLayout(), use
NUI_InitializeLayout() and NUI_FinalizeLayout() instead.
NUI_InitializeWindow(NuiRect(0.0, 0.0, 400.0, 300.0));
NUI_StartColumn();
NUI_StartRow();
NUI_AddElement(NuiLabel(JsonString("Hello"), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE)));
NUI_End();
NUI_End();
json jWindow = NUI_FinalizeWindow();
Adapted from ef_s_nuibuilder by Daz.
-
void NUI_End()
Close the current node and insert it in its parent. An error is logged if the parent does not accept that kind of child.
-
void NUI_StartColumn()
Open a column.
-
void NUI_StartRow()
Open a row.
-
void NUI_StartGroup(int bBorder = TRUE, int nScrollbar = NUI_SCROLLBARS_AUTO)
- Parameters:
bBorder – Draw a border. Defaults to TRUE.
nScrollbar – A NUI_SCROLLBARS_* constant. Defaults to NUI_SCROLLBARS_AUTO.
Open a group. A group holds a single child.
-
void NUI_StartElement(json jElement)
- Parameters:
jElement – The element (NuiLabel, NuiButton, NuiSpacer, …).
Open an element, to attach a draw list or set properties on it.
-
void NUI_AddElement(json jElement)
- Parameters:
jElement – The element (NuiLabel, NuiButton, NuiSpacer, …).
Add an element.
-
void NUI_AddSpacer()
Add a spacer.
-
void NUI_StartList(json jRowCount, float fRowHeight = NUI_STYLE_ROW_HEIGHT, int bBorder = TRUE, int nScroll = NUI_SCROLLBARS_Y)
- Parameters:
jRowCount – Number of rows (usually a bind).
fRowHeight – Row height. Defaults to NUI_STYLE_ROW_HEIGHT.
bBorder – Draw a border. Defaults to TRUE.
nScroll – A NUI_SCROLLBARS_* constant. Defaults to NUI_SCROLLBARS_Y.
Open a list. Children are list template cells.
-
void NUI_StartListTemplateCell(float fWidth, int bVariable)
- Parameters:
fWidth – Cell width.
bVariable – Cell width is variable.
Open a list template cell. A cell holds a single child; a list holds up to 16 cells.
-
void NUI_StartDrawList(json jScissor)
- Parameters:
jScissor – Boolean (or bind): clip draw list items to the parent bounds.
Open a draw list, merged into the parent element or layout.
-
void NUI_AddDrawListItem(json jDrawListItem)
- Parameters:
jDrawListItem – The item (NuiDrawListImage, NuiDrawListText, …).
Add a draw list item.
-
void NUI_StartStaticCombo(json jSelected)
- Parameters:
jSelected – Selected value (usually a bind).
Open a combo box with static entries.
-
void NUI_AddStaticComboEntry(string sLabel, int nValue)
- Parameters:
sLabel – Entry label.
nValue – Entry value.
Add a combo box entry.
-
void NUI_StartStaticOptions(int nDirection, json jValue)
- Parameters:
nDirection – A NUI_DIRECTION_* constant.
jValue – Selected value (usually a bind).
Open an options (radio) group with static entries.
-
void NUI_AddStaticOptionsEntry(string sLabel)
- Parameters:
sLabel – Entry label.
Add an options entry.
-
void NUI_SetAspect(float fAspect)
- Parameters:
fAspect – Aspect ratio.
Set the aspect ratio of the current node.
-
void NUI_SetEnabled(json jEnabler)
- Parameters:
jEnabler – Boolean (or bind).
Set the enabled state of the current node.
-
void NUI_SetHeight(float fHeight)
- Parameters:
fHeight – Height.
Set the height of the current node.
-
void NUI_SetId(string sId)
- Parameters:
sId – Id.
Set the id of the current node.
-
void NUI_SetMargin(float fMargin)
- Parameters:
fMargin – Margin.
Set the margin of the current node.
-
void NUI_SetPadding(float fPadding)
- Parameters:
fPadding – Padding.
Set the padding of the current node.
-
void NUI_SetForegroundColor(json jColor)
- Parameters:
jColor – Color (or bind).
Set the foreground color of the current node.
-
void NUI_SetFont(json jFont)
- Parameters:
jFont – Font name (or bind).
Set the font of the current node.
-
void NUI_SetTooltip(json jTooltip)
- Parameters:
jTooltip – Text (or bind).
Set the tooltip of the current node.
-
void NUI_SetDisabledTooltip(json jDisabledTooltip)
- Parameters:
jDisabledTooltip – Text (or bind).
Set the disabled tooltip of the current node.
-
void NUI_SetEncouraged(json jEncouraged)
- Parameters:
jEncouraged – Boolean (or bind).
Set the encouraged state of the current node.
-
void NUI_SetVisible(json jVisible)
- Parameters:
jVisible – Boolean (or bind).
Set the visibility of the current node.
-
void NUI_SetWidth(float fWidth)
- Parameters:
fWidth – Width.
Set the width of the current node.
-
void NUI_SetDimensions(float fWidth, float fHeight)
- Parameters:
fWidth – Width.
fHeight – Height.
Set the width and height of the current node.
-
void NUI_InitializeWindow(json jGeometry)
- Parameters:
jGeometry – Window geometry: a NuiRect, or a bind.
Start a new window and reset the build state. The window has an empty title, is not resizable, is closable and opaque, has a border, and accepts input.
-
void NUI_InitializeLayout()
Reset the build state to build a layout without a window, for example for NuiSetGroupLayout().
-
json NUI_FinalizeLayout()
- Returns:
The root column, row or group.
Return the layout built since NUI_InitializeLayout().
-
void NUI_SetWindowVersion(int nVersion)
- Parameters:
nVersion – Version.
Set the window version.
-
void NUI_SetWindowTitle(json jTitle)
- Parameters:
jTitle – Text (or bind), or JsonBool(FALSE) to hide the title bar.
Set the window title.
-
void NUI_SetWindowGeometry(json jGeometry)
- Parameters:
jGeometry – A NuiRect, or a bind.
Set the window geometry.
-
void NUI_SetWindowResizable(json jResizable)
- Parameters:
jResizable – Boolean (or bind).
Set whether the window is resizable.
-
void NUI_SetWindowCollapsed(json jCollapsed)
- Parameters:
jCollapsed – Boolean (or bind), or JsonNull() to let the player decide.
Set whether the window is collapsed.
-
void NUI_SetWindowClosable(json jClosable)
- Parameters:
jClosable – Boolean (or bind).
Set whether the window is closable.
-
void NUI_SetWindowTransparent(json jTransparent)
- Parameters:
jTransparent – Boolean (or bind).
Set whether the window background is transparent.
-
void NUI_SetWindowBorder(json jBorder)
- Parameters:
jBorder – Boolean (or bind).
Set whether the window has a border.
-
void NUI_SetWindowAcceptsInput(json jAcceptsInput)
- Parameters:
jAcceptsInput – Boolean (or bind).
Set whether the window accepts input.
-
void NUI_SetWindowTitlebarHidden()
Hide the window title bar; the window can then be neither collapsed nor closed.
-
void NUI_SetWindowFont(json jFont)
- Parameters:
jFont – Font name (or bind).
Set the window font.
-
json NUI_FinalizeWindow()
- Returns:
The window, ready for NuiCreate().
Set the built layout as the window root and return the window.
Source code
// @code
#include "ff_i_console"
#include "nw_inc_nui"
// -----------------------------------------------------------------------------
//! @brief Close the current node and insert it in its parent.
//! An error is logged if the parent does not accept that kind of child.
void NUI_End();
void NUI_End()
{
int nChild = _NUI_GetType();
json jChild = _NUI_GetData();
_NUI_SetDepth(_NUI_GetDepth() - 1);
int nParent = _NUI_GetType();
json jParent = _NUI_GetData();
// LogDebug("ff_i_nuibuilder: [" + IntToString(_NUI_GetDepth()) + "] insert "
// + _NUI_TypeToString(nChild) + " -> " + _NUI_TypeToString(nParent));
switch (nParent)
{
case _NUI_TYPE_ROOT:
if (_NUI_IsLayoutType(nChild))
_NUI_SetData(jChild);
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_COLUMN:
case _NUI_TYPE_ROW:
if (_NUI_IsLayoutType(nChild) || _NUI_IsElementType(nChild))
_NUI_SetData(_NUI_JsonObjectInsertToArrayWithKey(jParent, "children", jChild));
else if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_GROUP:
if (_NUI_IsLayoutType(nChild) || _NUI_IsElementType(nChild))
_NUI_SetData(JsonObjectSet(jParent, "children", JsonArrayInsert(JsonArray(), jChild)));
else if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_ELEMENT:
if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_LIST:
if (nChild == _NUI_TYPE_LIST_TEMPLATE_CELL)
{
if (JsonGetLength(JsonObjectGet(jParent, "row_template")) < 16)
_NUI_SetData(_NUI_JsonObjectInsertToArrayWithKey(jParent, "row_template", jChild));
else
LogError("ff_i_nuibuilder: LIST only supports up to 16 LIST_TEMPLATE_CELL");
}
else if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_LIST_TEMPLATE_CELL:
if (_NUI_IsElementType(nChild) || nChild == _NUI_TYPE_GROUP)
_NUI_SetData(JsonArraySet(jParent, 0, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_DRAWLIST:
if (nChild == _NUI_TYPE_DRAWLIST_ITEM)
_NUI_SetData(_NUI_JsonObjectInsertToArrayWithKey(jParent, "draw_list", jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_STATIC_COMBO:
if (nChild == _NUI_TYPE_STATIC_COMBO_ENTRY)
_NUI_SetData(_NUI_JsonObjectInsertToArrayWithKey(jParent, "elements", jChild));
else if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
case _NUI_TYPE_STATIC_OPTIONS:
if (nChild == _NUI_TYPE_STATIC_OPTIONS_ENTRY)
_NUI_SetData(_NUI_JsonObjectInsertToArrayWithKey(jParent, "elements", jChild));
else if (nChild == _NUI_TYPE_DRAWLIST)
_NUI_SetData(JsonMerge(jParent, jChild));
else
_NUI_Mismatch(nChild, nParent);
break;
default:
// DRAWLIST_ITEM, STATIC_COMBO_ENTRY and STATIC_OPTIONS_ENTRY accept no children
_NUI_Mismatch(nChild, nParent);
break;
}
}
// -----------------------------------------------------------------------------
//! @brief Open a column.
void NUI_StartColumn();
void NUI_StartColumn()
{
_NUI_Start(_NUI_TYPE_COLUMN, NuiCol(JsonArray()));
}
//! @brief Open a row.
void NUI_StartRow();
void NUI_StartRow()
{
_NUI_Start(_NUI_TYPE_ROW, NuiRow(JsonArray()));
}
//! @brief Open a group. A group holds a single child.
//! @param bBorder Draw a border. Defaults to TRUE.
//! @param nScrollbar A NUI_SCROLLBARS_* constant. Defaults to NUI_SCROLLBARS_AUTO.
void NUI_StartGroup(int bBorder = TRUE, int nScrollbar = NUI_SCROLLBARS_AUTO);
void NUI_StartGroup(int bBorder = TRUE, int nScrollbar = NUI_SCROLLBARS_AUTO)
{
_NUI_Start(_NUI_TYPE_GROUP, NuiGroup(JsonNull(), bBorder, nScrollbar));
}
//! @brief Open an element, to attach a draw list or set properties on it.
//! @param jElement The element (NuiLabel, NuiButton, NuiSpacer, ...).
void NUI_StartElement(json jElement);
void NUI_StartElement(json jElement)
{
_NUI_Start(_NUI_TYPE_ELEMENT, jElement);
}
//! @brief Add an element.
//! @param jElement The element (NuiLabel, NuiButton, NuiSpacer, ...).
void NUI_AddElement(json jElement);
void NUI_AddElement(json jElement)
{
NUI_StartElement(jElement);
NUI_End();
}
//! @brief Add a spacer.
void NUI_AddSpacer();
void NUI_AddSpacer()
{
NUI_AddElement(NuiSpacer());
}
//! @brief Open a list. Children are list template cells.
//! @param jRowCount Number of rows (usually a bind).
//! @param fRowHeight Row height. Defaults to NUI_STYLE_ROW_HEIGHT.
//! @param bBorder Draw a border. Defaults to TRUE.
//! @param nScroll A NUI_SCROLLBARS_* constant. Defaults to NUI_SCROLLBARS_Y.
void NUI_StartList(json jRowCount, float fRowHeight = NUI_STYLE_ROW_HEIGHT, int bBorder = TRUE, int nScroll = NUI_SCROLLBARS_Y);
void NUI_StartList(json jRowCount, float fRowHeight = NUI_STYLE_ROW_HEIGHT, int bBorder = TRUE, int nScroll = NUI_SCROLLBARS_Y)
{
_NUI_Start(_NUI_TYPE_LIST, NuiList(JsonArray(), jRowCount, fRowHeight, bBorder, nScroll));
}
//! @brief Open a list template cell. A cell holds a single child; a list holds up to 16 cells.
//! @param fWidth Cell width.
//! @param bVariable Cell width is variable.
void NUI_StartListTemplateCell(float fWidth, int bVariable);
void NUI_StartListTemplateCell(float fWidth, int bVariable)
{
_NUI_Start(_NUI_TYPE_LIST_TEMPLATE_CELL, NuiListTemplateCell(JsonNull(), fWidth, bVariable));
}
//! @brief Open a draw list, merged into the parent element or layout.
//! @param jScissor Boolean (or bind): clip draw list items to the parent bounds.
void NUI_StartDrawList(json jScissor);
void NUI_StartDrawList(json jScissor)
{
_NUI_Start(_NUI_TYPE_DRAWLIST, NuiDrawList(JsonObject(), jScissor, JsonArray()));
}
//! @brief Add a draw list item.
//! @param jDrawListItem The item (NuiDrawListImage, NuiDrawListText, ...).
void NUI_AddDrawListItem(json jDrawListItem);
void NUI_AddDrawListItem(json jDrawListItem)
{
_NUI_Start(_NUI_TYPE_DRAWLIST_ITEM, jDrawListItem);
NUI_End();
}
//! @brief Open a combo box with static entries.
//! @param jSelected Selected value (usually a bind).
void NUI_StartStaticCombo(json jSelected);
void NUI_StartStaticCombo(json jSelected)
{
_NUI_Start(_NUI_TYPE_STATIC_COMBO, NuiCombo(JsonArray(), jSelected));
}
//! @brief Add a combo box entry.
//! @param sLabel Entry label.
//! @param nValue Entry value.
void NUI_AddStaticComboEntry(string sLabel, int nValue);
void NUI_AddStaticComboEntry(string sLabel, int nValue)
{
_NUI_Start(_NUI_TYPE_STATIC_COMBO_ENTRY, NuiComboEntry(sLabel, nValue));
NUI_End();
}
//! @brief Open an options (radio) group with static entries.
//! @param nDirection A NUI_DIRECTION_* constant.
//! @param jValue Selected value (usually a bind).
void NUI_StartStaticOptions(int nDirection, json jValue);
void NUI_StartStaticOptions(int nDirection, json jValue)
{
_NUI_Start(_NUI_TYPE_STATIC_OPTIONS, NuiOptions(nDirection, JsonArray(), jValue));
}
//! @brief Add an options entry.
//! @param sLabel Entry label.
void NUI_AddStaticOptionsEntry(string sLabel);
void NUI_AddStaticOptionsEntry(string sLabel)
{
_NUI_Start(_NUI_TYPE_STATIC_OPTIONS_ENTRY, JsonString(sLabel));
NUI_End();
}
// -----------------------------------------------------------------------------
//! @brief Set the aspect ratio of the current node.
//! @param fAspect Aspect ratio.
void NUI_SetAspect(float fAspect);
void NUI_SetAspect(float fAspect)
{
_NUI_SetData(NuiAspect(_NUI_GetData(), fAspect));
}
//! @brief Set the enabled state of the current node.
//! @param jEnabler Boolean (or bind).
void NUI_SetEnabled(json jEnabler);
void NUI_SetEnabled(json jEnabler)
{
_NUI_SetData(NuiEnabled(_NUI_GetData(), jEnabler));
}
//! @brief Set the height of the current node.
//! @param fHeight Height.
void NUI_SetHeight(float fHeight);
void NUI_SetHeight(float fHeight)
{
_NUI_SetData(NuiHeight(_NUI_GetData(), fHeight));
}
//! @brief Set the id of the current node.
//! @param sId Id.
void NUI_SetId(string sId);
void NUI_SetId(string sId)
{
_NUI_SetData(NuiId(_NUI_GetData(), sId));
}
//! @brief Set the margin of the current node.
//! @param fMargin Margin.
void NUI_SetMargin(float fMargin);
void NUI_SetMargin(float fMargin)
{
_NUI_SetData(NuiMargin(_NUI_GetData(), fMargin));
}
//! @brief Set the padding of the current node.
//! @param fPadding Padding.
void NUI_SetPadding(float fPadding);
void NUI_SetPadding(float fPadding)
{
_NUI_SetData(NuiPadding(_NUI_GetData(), fPadding));
}
//! @brief Set the foreground color of the current node.
//! @param jColor Color (or bind).
void NUI_SetForegroundColor(json jColor);
void NUI_SetForegroundColor(json jColor)
{
_NUI_SetData(NuiStyleForegroundColor(_NUI_GetData(), jColor));
}
//! @brief Set the font of the current node.
//! @param jFont Font name (or bind).
void NUI_SetFont(json jFont);
void NUI_SetFont(json jFont)
{
_NUI_SetData(NuiStyleFont(_NUI_GetData(), jFont));
}
//! @brief Set the tooltip of the current node.
//! @param jTooltip Text (or bind).
void NUI_SetTooltip(json jTooltip);
void NUI_SetTooltip(json jTooltip)
{
_NUI_SetData(NuiTooltip(_NUI_GetData(), jTooltip));
}
//! @brief Set the disabled tooltip of the current node.
//! @param jDisabledTooltip Text (or bind).
void NUI_SetDisabledTooltip(json jDisabledTooltip);
void NUI_SetDisabledTooltip(json jDisabledTooltip)
{
_NUI_SetData(NuiDisabledTooltip(_NUI_GetData(), jDisabledTooltip));
}
//! @brief Set the encouraged state of the current node.
//! @param jEncouraged Boolean (or bind).
void NUI_SetEncouraged(json jEncouraged);
void NUI_SetEncouraged(json jEncouraged)
{
_NUI_SetData(NuiEncouraged(_NUI_GetData(), jEncouraged));
}
//! @brief Set the visibility of the current node.
//! @param jVisible Boolean (or bind).
void NUI_SetVisible(json jVisible);
void NUI_SetVisible(json jVisible)
{
_NUI_SetData(NuiVisible(_NUI_GetData(), jVisible));
}
//! @brief Set the width of the current node.
//! @param fWidth Width.
void NUI_SetWidth(float fWidth);
void NUI_SetWidth(float fWidth)
{
_NUI_SetData(NuiWidth(_NUI_GetData(), fWidth));
}
//! @brief Set the width and height of the current node.
//! @param fWidth Width.
//! @param fHeight Height.
void NUI_SetDimensions(float fWidth, float fHeight);
void NUI_SetDimensions(float fWidth, float fHeight)
{
NUI_SetWidth(fWidth);
NUI_SetHeight(fHeight);
}
// -----------------------------------------------------------------------------
//! @brief Start a new window and reset the build state.
//! The window has an empty title, is not resizable, is closable and opaque, has
//! a border, and accepts input.
//! @param jGeometry Window geometry: a NuiRect, or a bind.
void NUI_InitializeWindow(json jGeometry);
void NUI_InitializeWindow(json jGeometry)
{
// LogDebug("ff_i_nuibuilder: initialize window");
_NUI_SetDepth(0);
_NUI_SetType(_NUI_TYPE_ROOT);
_NUI_SetData(JsonNull());
SetLocalJson(OBJECT_SELF, _NUI_WINDOW,
NuiWindow(JsonNull(), JsonString(""), jGeometry, JsonBool(FALSE), JsonNull(),
JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE), JsonBool(TRUE)));
}
//! @brief Reset the build state to build a layout without a window, for
//! example for NuiSetGroupLayout().
void NUI_InitializeLayout();
void NUI_InitializeLayout()
{
// LogDebug("ff_i_nuibuilder: initialize layout");
_NUI_SetDepth(0);
_NUI_SetType(_NUI_TYPE_ROOT);
_NUI_SetData(JsonNull());
}
//! @brief Return the layout built since NUI_InitializeLayout().
//! @return The root column, row or group.
json NUI_FinalizeLayout();
json NUI_FinalizeLayout()
{
// LogDebug("ff_i_nuibuilder: finalize layout");
return _NUI_GetData();
}
//! @brief Set the window version.
//! @param nVersion Version.
void NUI_SetWindowVersion(int nVersion);
void NUI_SetWindowVersion(int nVersion)
{
_NUI_SetWindowKey("version", JsonInt(nVersion));
}
//! @brief Set the window title.
//! @param jTitle Text (or bind), or JsonBool(FALSE) to hide the title bar.
void NUI_SetWindowTitle(json jTitle);
void NUI_SetWindowTitle(json jTitle)
{
_NUI_SetWindowKey("title", jTitle);
}
//! @brief Set the window geometry.
//! @param jGeometry A NuiRect, or a bind.
void NUI_SetWindowGeometry(json jGeometry);
void NUI_SetWindowGeometry(json jGeometry)
{
_NUI_SetWindowKey("geometry", jGeometry);
}
//! @brief Set whether the window is resizable.
//! @param jResizable Boolean (or bind).
void NUI_SetWindowResizable(json jResizable);
void NUI_SetWindowResizable(json jResizable)
{
_NUI_SetWindowKey("resizable", jResizable);
}
//! @brief Set whether the window is collapsed.
//! @param jCollapsed Boolean (or bind), or JsonNull() to let the player decide.
void NUI_SetWindowCollapsed(json jCollapsed);
void NUI_SetWindowCollapsed(json jCollapsed)
{
_NUI_SetWindowKey("collapsed", jCollapsed);
}
//! @brief Set whether the window is closable.
//! @param jClosable Boolean (or bind).
void NUI_SetWindowClosable(json jClosable);
void NUI_SetWindowClosable(json jClosable)
{
_NUI_SetWindowKey("closable", jClosable);
}
//! @brief Set whether the window background is transparent.
//! @param jTransparent Boolean (or bind).
void NUI_SetWindowTransparent(json jTransparent);
void NUI_SetWindowTransparent(json jTransparent)
{
_NUI_SetWindowKey("transparent", jTransparent);
}
//! @brief Set whether the window has a border.
//! @param jBorder Boolean (or bind).
void NUI_SetWindowBorder(json jBorder);
void NUI_SetWindowBorder(json jBorder)
{
_NUI_SetWindowKey("border", jBorder);
}
//! @brief Set whether the window accepts input.
//! @param jAcceptsInput Boolean (or bind).
void NUI_SetWindowAcceptsInput(json jAcceptsInput);
void NUI_SetWindowAcceptsInput(json jAcceptsInput)
{
_NUI_SetWindowKey("accepts_input", jAcceptsInput);
}
//! @brief Hide the window title bar; the window can then be neither collapsed nor closed.
void NUI_SetWindowTitlebarHidden();
void NUI_SetWindowTitlebarHidden()
{
NUI_SetWindowTitle(JsonBool(FALSE));
NUI_SetWindowCollapsed(JsonBool(FALSE));
NUI_SetWindowClosable(JsonBool(FALSE));
}
//! @brief Set the window font.
//! @param jFont Font name (or bind).
void NUI_SetWindowFont(json jFont);
void NUI_SetWindowFont(json jFont)
{
_NUI_SetWindowKey("font", jFont);
}
//! @brief Set the built layout as the window root and return the window.
//! @return The window, ready for NuiCreate().
json NUI_FinalizeWindow();
json NUI_FinalizeWindow()
{
// LogDebug("ff_i_nuibuilder: finalize window");
_NUI_SetWindowKey("root", _NUI_GetData());
return _NUI_GetWindow();
}