Defold GUI system
Namespace: | dmGui |
Include: | #include <dmsdk/gui/gui.h> |
void AdjustMode()
PARAMETERS
void AdjustReference()
PARAMETERS
void DeleteNode(dmGui::HScene scene, dmGui::HNode node)
Defer delete a node
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the node to delete |
dmGui::HNode GetFirstChildNode(dmGui::HScene scene, dmGui::HNode node)
Get first child node
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
Gets the first child node. If 0, gets the first top level node. |
RETURNS
dmGui::HNode |
The first child node |
dmGui::HNode GetNextNode(dmGui::HScene scene, dmGui::HNode node)
Get next sibling
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the current sibling |
RETURNS
dmGui::HNode |
the next sibling, or INVALID_HANDLE if no more siblings |
uint32_t GetNodeCustomData(dmGui::HScene scene, HNode node)
get node custom type
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
RETURNS
uint32_t |
the custom type. Or 0 if it is no custom type |
void* GetNodeCustomData(dmGui::HScene scene, HNode node)
get node custom data
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
RETURNS
void* |
the custom data created per node by the gui node type extension |
dmhash_t GetNodeId(dmGui::HScene scene, dmGui::HNode node)
Get the id of a node.
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
RETURNS
dmhash_t |
the id of the node |
bool GetNodeIsBone(dmGui::HScene scene, dmGui::HNode node)
Query if the node is a bone
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
RETURNS
bool |
true if the node is a bone |
dmGui::HNode GetNodeParent(dmGui::HScene scene, dmGui::HNode node)
Get the parent of a gui node
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
RETURNS
dmGui::HNode |
the parent, or INVALID_HANDLE is unsuccessful |
dmVMath::Vector4 GetNodeProperty( scene, node, dmGui::Property property)
Get property value
PARAMETERS
|
scene |
type: dmGui::HScene] scene |
|
node |
type: dmGui::HNode] node |
dmGui::Property |
property |
property enum |
RETURNS
dmVMath::Vector4 |
dmhash_t GetNodeTextureId(dmGui::HScene scene, HNode node)
get node texture
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
RETURNS
dmhash_t |
the currently assigned texture |
void* GetResource(dmGui::HScene scene, dmhash_t resource_id, dmhash_t suffix_with_dot)
Gets a resource by its resource alias.
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmhash_t |
resource_id |
the resource alias |
dmhash_t |
suffix_with_dot |
the hash of the suffix: hash(".spinescenec") |
RETURNS
void* |
the resource if successful |
void HContext()
A handle to a gui context
PARAMETERS
void HNode()
A handle to a gui node
PARAMETERS
void HScene()
A handle to a gui scene
PARAMETERS
void HScript()
A handle to a gui script
PARAMETERS
void HTextureSource()
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.
PARAMETERS
void INVALID_HANDLE()
Invalid node handle
PARAMETERS
void LuaPushNode(lua_State* L, dmGui::HScene scene, HNode node)
Pushes a dmGui::HNode to the stack
PARAMETERS
lua_State* |
L |
the Lua scene |
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
dmGui::HNode NewNode(dmGui::HScene scene, dmVMath::Point3 position, dmVMath::Vector3 size, dmGui::NodeType node_type, uint32_t custom_type)
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmVMath::Point3 |
position |
the position |
dmVMath::Vector3 |
size |
the size |
dmGui::NodeType |
node_type |
the node type |
uint32_t |
custom_type |
If node_type == dmGui::NODE_TYPE_CUSTOM, then this is used to create a custom node data for the registered custom type |
RETURNS
dmGui::HNode |
the created node |
void NodeTextureType()
This enum denotes what kind of texture type the m_Texture pointer is referencing.
PARAMETERS
void Playback()
PARAMETERS
void Property()
PARAMETERS
void Result()
PARAMETERS
void Result()
PARAMETERS
void SetNodeAdjustMode( scene, node, AdjustMode adjust_mode)
Set adjust mode
PARAMETERS
|
scene |
type: dmGui::HScene] scene |
|
node |
type: dmGui::HNode] node |
AdjustMode |
adjust_mode |
the adjust mode |
void SetNodeId(dmGui::HScene scene, dmGui::HNode node, dmhash_t id)
Set the id of a node.
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
dmhash_t |
id |
the id |
void SetNodeIsBone(dmGui::HScene scene, dmGui::HNode node, bool is_bone)
Set the bone state of the node
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
bool |
is_bone |
true if the node is ot be used as a bone |
dmGui::Result SetNodeParent(dmGui::HScene scene, dmGui::HNode node, dmGui::HNode parent, bool keep_scene_transform)
Set the parent of a gui node
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
dmGui::HNode |
node |
the gui node |
dmGui::HNode |
parent |
the new parent. May be null |
bool |
keep_scene_transform |
true to keep the world position |
RETURNS
dmGui::Result |
dmGui::RESULT_OK is successful |
void SetNodeProperty( scene, node, dmGui::Property property, dmVMath::Vector4 value)
Set property value
PARAMETERS
|
scene |
type: dmGui::HScene] scene |
|
node |
type: dmGui::HNode] node |
dmGui::Property |
property |
property enum |
dmVMath::Vector4 |
value |
void SetNodeTexture(dmGui::HScene scene, HNode node, dmhash_t texture_id)
set node texture
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
dmhash_t |
texture_id |
the texture id |
void SetNodeTexture(dmGui::HScene scene, HNode node, NodeTextureType type, void* texture)
set node texture
PARAMETERS
dmGui::HScene |
scene |
the gui scene |
HNode |
node |
the gui node |
NodeTextureType |
type |
the type of texture |
void* |
texture |
A pointer to a e.g. dmGameSystem::TextureSetResource* |