determines if the node is pickable by the supplied coordinates * Tests whether a coordinate is within the bounding box of a * node. * * @name gui.pick_node * @param node [type:node] node to be tested for picking * @param x [type:number] x-coordinate (see on_input ) * @param y [type:number] y-coordinate (see on_input
| 3470 | * @return pickable [type:boolean] pick result |
| 3471 | */ |
| 3472 | static int LuaPickNode(lua_State* L) |
| 3473 | { |
| 3474 | HNode hnode; |
| 3475 | InternalNode* n = LuaCheckNodeInternal(L, 1, &hnode); |
| 3476 | (void) n; |
| 3477 | |
| 3478 | lua_Number x = luaL_checknumber(L, 2); |
| 3479 | lua_Number y = luaL_checknumber(L, 3); |
| 3480 | |
| 3481 | Scene* scene = GuiScriptInstance_Check(L); |
| 3482 | |
| 3483 | lua_pushboolean(L, PickNode(scene, hnode, (float) x, (float) y)); |
| 3484 | return 1; |
| 3485 | } |
| 3486 | |
| 3487 | /*# returns if a node is enabled or not |
| 3488 | * Returns `true` if a node is enabled and `false` if it's not. |
nothing calls this directly
no test coverage detected