|
@@ -19024,7 +19024,7 @@ nk_pool_init_fixed(struct nk_pool *pool, void *memory, nk_size size)
|
|
|
NK_ASSERT(size >= sizeof(struct nk_page));
|
|
|
if (size < sizeof(struct nk_page)) return;
|
|
|
/* first nk_page_element is embedded in nk_page, additional elements follow in adjacent space */
|
|
|
- pool->capacity = 1 + (unsigned)(size - sizeof(struct nk_page)) / sizeof(struct nk_page_element);
|
|
|
+ pool->capacity = (unsigned)(1 + (size - sizeof(struct nk_page)) / sizeof(struct nk_page_element));
|
|
|
pool->pages = (struct nk_page*)memory;
|
|
|
pool->type = NK_BUFFER_FIXED;
|
|
|
pool->size = size;
|
|
@@ -19330,8 +19330,8 @@ nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type pan
|
|
|
|
|
|
/* window movement */
|
|
|
if ((win->flags & NK_WINDOW_MOVABLE) && !(win->flags & NK_WINDOW_ROM)) {
|
|
|
- int left_mouse_down;
|
|
|
- int left_mouse_clicked;
|
|
|
+ nk_bool left_mouse_down;
|
|
|
+ unsigned int left_mouse_clicked;
|
|
|
int left_mouse_click_in_cursor;
|
|
|
|
|
|
/* calculate draggable window space */
|
|
@@ -19346,7 +19346,7 @@ nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type pan
|
|
|
|
|
|
/* window movement by dragging */
|
|
|
left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;
|
|
|
- left_mouse_clicked = (int)in->mouse.buttons[NK_BUTTON_LEFT].clicked;
|
|
|
+ left_mouse_clicked = in->mouse.buttons[NK_BUTTON_LEFT].clicked;
|
|
|
left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,
|
|
|
NK_BUTTON_LEFT, header, nk_true);
|
|
|
if (left_mouse_down && left_mouse_click_in_cursor && !left_mouse_clicked) {
|
|
@@ -21865,7 +21865,7 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,
|
|
|
panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,
|
|
|
layout->bounds.w, layout->row.columns);
|
|
|
|
|
|
- #define NK_FRAC(x) (x - (int)x) /* will be used to remove fookin gaps */
|
|
|
+ #define NK_FRAC(x) (x - (float)(int)x) /* will be used to remove fookin gaps */
|
|
|
/* calculate the width of one item inside the current layout space */
|
|
|
switch (layout->row.type) {
|
|
|
case NK_LAYOUT_DYNAMIC_FIXED: {
|
|
@@ -25074,7 +25074,7 @@ nk_scrollbar_behavior(nk_flags *state, struct nk_input *in,
|
|
|
{
|
|
|
nk_flags ws = 0;
|
|
|
int left_mouse_down;
|
|
|
- int left_mouse_clicked;
|
|
|
+ unsigned int left_mouse_clicked;
|
|
|
int left_mouse_click_in_cursor;
|
|
|
float scroll_delta;
|
|
|
|
|
@@ -29508,4 +29508,3 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
|
|
|
/// in libraries and brought me to create some of my own. Finally Apoorva Joshi
|
|
|
/// for his single header file packer.
|
|
|
*/
|
|
|
-
|