Namespace: dmGui
Language: C++
Type: Defold C++
File: gui.h
Source: engine/gui/src/dmsdk/gui/gui.h
Include: dmsdk/gui/gui.h
Defold GUI system
Type: ENUM
Members
ADJUST_MODE_FIT - //!< 0ADJUST_MODE_ZOOM - //!< 1ADJUST_MODE_STRETCH - //!< 2Type: ENUM
Members
ADJUST_REFERENCE_PARENTADJUST_REFERENCE_DISABLEDType: STRUCT Custom GUI node property value. String values returned from GetNodeCustomProperty() are owned by the GUI scene and must not be freed by the caller. String values passed to SetNodeCustomProperty() are copied.
Members
m_Type (dmGui::CustomPropertyType) - the value typeType: ENUM
Members
CUSTOM_PROPERTY_TYPE_NUMBERCUSTOM_PROPERTY_TYPE_BOOLEANCUSTOM_PROPERTY_TYPE_HASHCUSTOM_PROPERTY_TYPE_STRINGCUSTOM_PROPERTY_TYPE_VECTOR3CUSTOM_PROPERTY_TYPE_VECTOR4CUSTOM_PROPERTY_TYPE_QUATType: FUNCTION Defer delete a node
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the node to deleteType: FUNCTION Get first child node
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - Gets the first child node. If 0, gets the first top level node.Returns
child (dmGui::HNode) - The first child nodeType: FUNCTION Get next sibling
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the current siblingReturns
sibling (dmGui::HNode) - the next sibling, or INVALID_HANDLE if no more siblingsType: FUNCTION get node custom type
Parameters
scene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodeReturns
type (uint32_t) - the custom type. Or 0 if it is no custom typeType: FUNCTION get node custom data
Parameters
scene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodeReturns
data (void*) - the custom data created per node by the gui node type extensionType: FUNCTION Get a custom property from a GUI node. String values returned in the output property are owned by the GUI scene and must not be freed by the caller.
Parameters
scene (dmGui::HScene) - scenenode (dmGui::HNode) - nodekey (dmhash_t) - property name hashprop (dmGui::CustomProperty*) - output propertyReturns
result (dmGui::Result) - RESULT_OK on successType: FUNCTION Get the id of a node.
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeReturns
id (dmhash_t) - the id of the nodeType: FUNCTION Query if the node is a bone
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeReturns
result (bool) - true if the node is a boneType: FUNCTION Get the parent of a gui node
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeReturns
parent (dmGui::HNode) - the parent, or INVALID_HANDLE is unsuccessfulType: FUNCTION Get property value
Parameters
scene (dmGui::HScene) - scenenode (dmGui::HNode) - nodeproperty (dmGui::Property) - property enumReturns
value (dmVMath::Vector4)Type: FUNCTION get node texture
Parameters
scene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodeReturns
texture (dmhash_t) - the currently assigned textureType: FUNCTION Gets a resource by its resource alias.
Parameters
scene (dmGui::HScene) - the gui sceneresource_id (dmhash_t) - the resource aliassuffix_with_dot (dmhash_t) - the hash of the suffix: hash(“.spinescenec”)Returns
resource (void*) - the resource if successfulType: TYPEDEF A handle to a gui context
Type: TYPEDEF A handle to a gui node
Type: TYPEDEF A handle to a gui scene
Type: TYPEDEF A handle to a gui script
Type: TYPEDEF A handle to a texture source, which can be a pointer to a resource, a dmGraphics::HTexture or a dynamic texture created from a gui script.
Type: FUNCTION Invalid node handle
Type: FUNCTION Pushes a dmGui::HNode to the stack
Parameters
L (lua_State*) - the Lua scenescene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodeType: FUNCTION
Parameters
scene (dmGui::HScene) - the gui sceneposition (dmVMath::Point3) - the positionsize (dmVMath::Vector3) - the sizenode_type (dmGui::NodeType) - the node typecustom_type (uint32_t) - If node_type == dmGui::NODE_TYPE_CUSTOM, then this is used to create a custom node data for the registered custom typeReturns
node (dmGui::HNode) - the created nodeType: ENUM This enum denotes what kind of texture type the m_Texture pointer is referencing.
Members
NODE_TEXTURE_TYPE_NONENODE_TEXTURE_TYPE_TEXTURENODE_TEXTURE_TYPE_TEXTURE_SETType: ENUM
Members
PLAYBACK_ONCE_FORWARDPLAYBACK_ONCE_BACKWARDPLAYBACK_ONCE_PINGPONGPLAYBACK_LOOP_FORWARDPLAYBACK_LOOP_BACKWARDPLAYBACK_LOOP_PINGPONGPLAYBACK_NONEType: ENUM
Members
PROPERTY_POSITION - //!< 0PROPERTY_ROTATION - //!< 1PROPERTY_SCALE - //!< 2PROPERTY_COLOR - //!< 3PROPERTY_SIZE - //!< 4PROPERTY_OUTLINE - //!< 5PROPERTY_SHADOW - //!< 6PROPERTY_SLICE9 - //!< 7PROPERTY_PIE_PARAMS - //!< 8PROPERTY_TEXT_PARAMS - //!< 9PROPERTY_COUNT - //!< 10Type: ENUM
Members
NODE_TYPE_BOX - //!< 0,NODE_TYPE_TEXT - //!< 1,NODE_TYPE_PIE - //!< 2,NODE_TYPE_TEMPLATE - //!< 3,NODE_TYPE_PARTICLEFX - //!< 5,NODE_TYPE_CUSTOM - //!< 6,NODE_TYPE_COUNT - //!< 7,Type: ENUM
Members
RESULT_OK - //!< 0RESULT_SYNTAX_ERROR - //!< -1RESULT_SCRIPT_ERROR - //!< -2RESULT_OUT_OF_RESOURCES - //!< -4RESULT_RESOURCE_NOT_FOUND - //!< -5RESULT_TEXTURE_ALREADY_EXISTS - //!< -6RESULT_INVAL_ERROR - //!< -7RESULT_INF_RECURSION - //!< -8RESULT_DATA_ERROR - //!< -9RESULT_WRONG_TYPE - //!< -10Type: FUNCTION Set adjust mode
Parameters
scene (dmGui::HScene) - scenenode (dmGui::HNode) - nodeadjust_mode (AdjustMode) - the adjust modeType: FUNCTION Set a custom property on a GUI node. String values are copied, and the caller retains ownership of the input string.
Parameters
scene (dmGui::HScene) - scenenode (dmGui::HNode) - nodekey (dmhash_t) - property name hashprop (const dmGui::CustomProperty*) - property valueReturns
result (dmGui::Result) - RESULT_OK on successType: FUNCTION Set the id of a node.
Notes
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeid (dmhash_t) - the idType: FUNCTION Set the bone state of the node
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeis_bone (bool) - true if the node is ot be used as a boneType: FUNCTION Set the parent of a gui node
Parameters
scene (dmGui::HScene) - the gui scenenode (dmGui::HNode) - the gui nodeparent (dmGui::HNode) - the new parent. May be nullkeep_scene_transform (bool) - true to keep the world positionReturns
result (dmGui::Result) - dmGui::RESULT_OK is successfulType: FUNCTION Set property value
Parameters
scene (dmGui::HScene) - scenenode (dmGui::HNode) - nodeproperty (dmGui::Property) - property enumvalue (dmVMath::Vector4)Type: FUNCTION set node texture
Parameters
scene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodetexture_id (dmhash_t) - the texture idType: FUNCTION set node texture
Parameters
scene (dmGui::HScene) - the gui scenenode (HNode) - the gui nodetype (NodeTextureType) - the type of texturetexture (void) - A pointer to a e.g. dmGameSystem::TextureSetResource