Skip to content

Commit 663d67d

Browse files
committed
v5.0.1
1 parent 6205a9e commit 663d67d

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11)
22
project(raylib_nuklear
33
DESCRIPTION "raylib_nuklear: Nuklear immediate mode GUI for raylib."
44
HOMEPAGE_URL "https://github.com/robloach/raylib-nuklear"
5-
VERSION 5.0.0
5+
VERSION 5.0.1
66
LANGUAGES C
77
)
88

include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ add_library(raylib_nuklear INTERFACE)
33
target_include_directories(raylib_nuklear INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
44
install(FILES
55
raylib-nuklear.h
6+
raylib-nuklear-font.h
67
nuklear.h
78
DESTINATION include
89
)

include/nuklear.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9694,14 +9694,16 @@ nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
96949694
struct nk_draw_command *prev = nk_draw_list_command_last(list);
96959695
if (prev->elem_count == 0) {
96969696
prev->texture = texture;
9697-
#ifdef NK_INCLUDE_COMMAND_USERDATA
9697+
#ifdef NK_INCLUDE_COMMAND_USERDATA
96989698
prev->userdata = list->userdata;
9699-
#endif
9700-
} else if (prev->texture.id != texture.id
9701-
#ifdef NK_INCLUDE_COMMAND_USERDATA
9702-
|| prev->userdata.id != list->userdata.id
9703-
#endif
9704-
) nk_draw_list_push_command(list, prev->clip_rect, texture);
9699+
#endif
9700+
} else if (prev->texture.id != texture.id
9701+
#ifdef NK_INCLUDE_COMMAND_USERDATA
9702+
|| prev->userdata.id != list->userdata.id
9703+
#endif
9704+
) {
9705+
nk_draw_list_push_command(list, prev->clip_rect, texture);
9706+
}
97059707
}
97069708
}
97079709
#ifdef NK_INCLUDE_COMMAND_USERDATA

include/raylib-nuklear.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ DrawNuklear(struct nk_context * ctx)
590590
case NK_COMMAND_POLYGON: {
591591
const struct nk_command_polygon *p = (const struct nk_command_polygon*)cmd;
592592
Color color = ColorFromNuklear(p->color);
593-
struct Vector2* points = (struct Vector2*)MemAlloc((p->point_count + 1) * (unsigned short)sizeof(Vector2));
593+
struct Vector2* points = (struct Vector2*)MemAlloc((unsigned int)((size_t)(p->point_count + 1) * sizeof(Vector2)));
594594
unsigned short i;
595595
for (i = 0; i < p->point_count; i++) {
596596
points[i].x = p->points[i].x * scale;
@@ -605,7 +605,7 @@ DrawNuklear(struct nk_context * ctx)
605605
// TODO: Implement NK_COMMAND_POLYGON_FILLED
606606
const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled*)cmd;
607607
Color color = ColorFromNuklear(p->color);
608-
struct Vector2* points = (struct Vector2*)MemAlloc((p->point_count + 1) * (unsigned short)sizeof(Vector2));
608+
struct Vector2* points = (struct Vector2*)MemAlloc((unsigned int)((size_t)(p->point_count + 1) * sizeof(Vector2)));
609609
unsigned short i;
610610
for (i = 0; i < p->point_count; i++) {
611611
points[i].x = p->points[i].x * scale;

0 commit comments

Comments
 (0)