mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-11 00:27:48 -04:00
Merge pull request #23 from mgerhardy/fixes
Fixed warnings and removed unused methods and global vars
This commit is contained in:
commit
c09651b655
1 changed files with 2 additions and 25 deletions
|
@ -45,7 +45,6 @@ static struct nk_user_font *fonts;
|
||||||
static int font_count;
|
static int font_count;
|
||||||
static char *edit_buffer;
|
static char *edit_buffer;
|
||||||
static const char **combobox_items;
|
static const char **combobox_items;
|
||||||
static struct nk_cursor cursors[NK_CURSOR_COUNT];
|
|
||||||
static float *floats;
|
static float *floats;
|
||||||
static int layout_ratio_count;
|
static int layout_ratio_count;
|
||||||
|
|
||||||
|
@ -363,28 +362,6 @@ static void nk_love_draw_rect_multi_color(int x, int y, unsigned int w,
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nk_love_clear(struct nk_color col)
|
|
||||||
{
|
|
||||||
lua_getglobal(L, "love");
|
|
||||||
lua_getfield(L, -1, "graphics");
|
|
||||||
lua_getfield(L, -1, "clear");
|
|
||||||
lua_pushnumber(L, col.r / 255.0);
|
|
||||||
lua_pushnumber(L, col.g / 255.0);
|
|
||||||
lua_pushnumber(L, col.b / 255.0);
|
|
||||||
lua_pushnumber(L, col.a / 255.0);
|
|
||||||
lua_call(L, 4, 0);
|
|
||||||
lua_pop(L, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void nk_love_blit()
|
|
||||||
{
|
|
||||||
lua_getglobal(L, "love");
|
|
||||||
lua_getfield(L, -1, "graphics");
|
|
||||||
lua_getfield(L, -1, "present");
|
|
||||||
lua_call(L, 0, 0);
|
|
||||||
lua_pop(L, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void nk_love_draw_image(int x, int y, unsigned int w, unsigned int h,
|
static void nk_love_draw_image(int x, int y, unsigned int w, unsigned int h,
|
||||||
struct nk_image image, struct nk_color color)
|
struct nk_image image, struct nk_color color)
|
||||||
{
|
{
|
||||||
|
@ -3437,12 +3414,12 @@ static int nk_love_input_is_mouse(int down)
|
||||||
|
|
||||||
static int nk_love_input_is_mouse_pressed(lua_State *L)
|
static int nk_love_input_is_mouse_pressed(lua_State *L)
|
||||||
{
|
{
|
||||||
nk_love_input_is_mouse(nk_true);
|
return nk_love_input_is_mouse(nk_true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nk_love_input_is_mouse_released(lua_State *L)
|
static int nk_love_input_is_mouse_released(lua_State *L)
|
||||||
{
|
{
|
||||||
nk_love_input_is_mouse(nk_false);
|
return nk_love_input_is_mouse(nk_false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nk_love_input_was_hovered(lua_State *L)
|
static int nk_love_input_was_hovered(lua_State *L)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue