From d73fde8fb1ad7bbeee1cb2c0a814bf2384e108a5 Mon Sep 17 00:00:00 2001 From: Kevin Harrison Date: Thu, 13 Dec 2018 17:49:02 -0500 Subject: [PATCH] Add section header comments --- src/nuklear_love.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/src/nuklear_love.c b/src/nuklear_love.c index 288b020..506c709 100644 --- a/src/nuklear_love.c +++ b/src/nuklear_love.c @@ -566,6 +566,14 @@ static void nk_love_getGraphics(float *line_thickness, struct nk_color *color) lua_pop(L, 6); } +/* + * =============================================================== + * + * GRAPHICS + * + * =============================================================== + */ + static void nk_love_scissor(int x, int y, int w, int h) { lua_getglobal(L, "love"); @@ -875,6 +883,14 @@ static void nk_love_draw_arc(int cx, int cy, unsigned int r, lua_pop(L, 1); } +/* + * =============================================================== + * + * INPUT + * + * =============================================================== + */ + static void nk_love_clipboard_paste(nk_handle usr, struct nk_text_edit *edit) { (void)usr; @@ -1483,6 +1499,14 @@ static int nk_love_frame_end(lua_State *L) return 0; } +/* + * =============================================================== + * + * TRANSFORM + * + * =============================================================== + */ + /* cos -sin 0 | cos sin 0 sin cos 0 | -sin cos 0 @@ -1660,6 +1684,14 @@ static int nk_love_translate(lua_State *L) return 0; } +/* + * =============================================================== + * + * WINDOW + * + * =============================================================== + */ + static int nk_love_window_begin(lua_State *L) { nk_love_assert_argc(lua_gettop(L) >= 1); @@ -1895,6 +1927,14 @@ static int nk_love_window_hide(lua_State *L) return 0; } +/* + * =============================================================== + * + * LAYOUT + * + * =============================================================== + */ + static int nk_love_layout_row(lua_State *L) { int argc = lua_gettop(L); @@ -2081,6 +2121,14 @@ static int nk_love_layout_ratio_from_pixel(lua_State *L) return 1; } +/* + * =============================================================== + * + * WIDGETS + * + * =============================================================== + */ + static int nk_love_group_begin(lua_State *L) { nk_love_assert_argc(lua_gettop(L) >= 2); @@ -2963,6 +3011,14 @@ static int nk_love_menu_end(lua_State *L) return 0; } +/* + * =============================================================== + * + * STYLE + * + * =============================================================== + */ + static int nk_love_style_default(lua_State *L) { nk_love_assert_argc(lua_gettop(L) == 1); @@ -3484,6 +3540,14 @@ static int nk_love_style_pop(lua_State *L) return 0; } +/* + * =============================================================== + * + * CUSTOM WIDGETS + * + * =============================================================== + */ + static int nk_love_widget_bounds(lua_State *L) { nk_love_assert_argc(lua_gettop(L) == 1); @@ -3839,6 +3903,14 @@ static int nk_love_input_is_hovered(lua_State *L) return 1; } +/* + * =============================================================== + * + * REGISTER + * + * =============================================================== + */ + #define NK_LOVE_REGISTER(name, func) \ lua_pushcfunction(L, func); \ lua_setfield(L, -2, name)