gets the id of the specified node * * Retrieves the id of the specified node. * * @name gui.get_id * @param node [type:node] the node to retrieve the id from * @return id [type:hash] the id of the node * @examples * * Gets the id of a node: * * ```lua * local node = gui.get_node("my_node") * * local id = gui.get_id(node) *
| 545 | * ``` |
| 546 | */ |
| 547 | static int LuaGetId(lua_State* L) |
| 548 | { |
| 549 | int top = lua_gettop(L); |
| 550 | (void) top; |
| 551 | |
| 552 | HNode hnode; |
| 553 | InternalNode* n = LuaCheckNodeInternal(L, 1, &hnode); |
| 554 | |
| 555 | dmScript::PushHash(L, n->m_NameHash); |
| 556 | |
| 557 | assert(top + 1 == lua_gettop(L)); |
| 558 | |
| 559 | return 1; |
| 560 | } |
| 561 | |
| 562 | /*# gets the node type |
| 563 | * |
nothing calls this directly
no test coverage detected