summaryrefslogtreecommitdiff
path: root/src/input/input.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-10-21 21:53:43 -0500
committersanine-a <sanine.not@pm.me>2020-10-21 21:53:43 -0500
commit78553e775f618d20e328bc85c635fbab4bf43d60 (patch)
tree6821c5bad562617030e0208045491c98f4daf75d /src/input/input.h
parentfd6e5bcef96ac5e769470823e24b984c9394bfd5 (diff)
add table recurtion to honey_lua_create_table and fix input setup
Diffstat (limited to 'src/input/input.h')
-rw-r--r--src/input/input.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/input/input.h b/src/input/input.h
index a8ae206..31be34a 100644
--- a/src/input/input.h
+++ b/src/input/input.h
@@ -157,11 +157,14 @@ void honey_setup_input(lua_State* L);
/** @brief Check if a key is down.
*
- * @param[in] key The key to query.
+ * This function accepts a single integer as input and returns TRUE if the integer
+ * refers to a valid key and is pressed down, and false otherwise.
+ *
+ * @param[in] L The lua state.
*
- * @return TRUE if the key is presently held down; FALSE if it is not, or if the keycode was out of bounds.
+ * @return 1 on success and 0 on failure.
*/
-bool honey_key_down(int key);
+int honey_key_down(lua_State* L);
/** @brief Bind a callback to a key.
*