diff --git a/CMakeLists.txt b/CMakeLists.txt index d5b9d5f..9eeb28b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11) project(raylib_nuklear DESCRIPTION "raylib_nuklear: Nuklear immediate mode GUI for raylib." HOMEPAGE_URL "https://github.com/robloach/raylib-nuklear" - VERSION 4.1.1 + VERSION 4.2.0 LANGUAGES C ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 23fdb2b..11bacd4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT raylib_FOUND) FetchContent_Declare( raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git - GIT_TAG 4.0.0 + GIT_TAG 4.2.0 ) FetchContent_GetProperties(raylib) if (NOT raylib_POPULATED) # Have we downloaded raylib yet? diff --git a/include/nuklear.h b/include/nuklear.h index 75e1569..a5d5bd4 100644 --- a/include/nuklear.h +++ b/include/nuklear.h @@ -372,7 +372,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_SIZE_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_SIZE_TYPE unsigned long #else #define NK_SIZE_TYPE unsigned int @@ -387,7 +387,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_POINTER_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_POINTER_TYPE unsigned long #else #define NK_POINTER_TYPE unsigned int @@ -26162,7 +26162,7 @@ nk_textedit_text(struct nk_text_edit *state, const char *text, int total_len) text+text_len, 1)) { nk_textedit_makeundo_insert(state, state->cursor, 1); - ++state->cursor; + state->cursor = NK_MIN(state->cursor + 1, state->string.len); state->has_preferred_x = 0; } } @@ -29656,6 +29656,9 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args) /// - [y]: Minor version with non-breaking API and library changes /// - [z]: Patch version with no direct changes to the API /// +/// - 2022/08/01 (4.10.2) - Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE +/// - 2022/08/01 (4.10.1) - Fix cursor jumping back to beginning of text when typing more than +/// nk_edit_xxx limit /// - 2022/05/27 (4.10.0) - Add nk_input_has_mouse_click_in_button_rect() to fix window move bug /// - 2022/04/18 (4.9.7) - Change button behavior when NK_BUTTON_TRIGGER_ON_RELEASE is defined to /// only trigger when the mouse position was inside the same button on down diff --git a/include/raylib-nuklear.h b/include/raylib-nuklear.h index 35b60d7..7a0c6bd 100644 --- a/include/raylib-nuklear.h +++ b/include/raylib-nuklear.h @@ -6,7 +6,7 @@ * - Use the nuklear immediate-mode graphical user interface in raylib. * * DEPENDENCIES: -* - raylib 4.0 https://www.raylib.com/ +* - raylib 4.2 https://www.raylib.com/ * - nuklear https://github.com/Immediate-Mode-UI/Nuklear * * LICENSE: zlib/libpng @@ -95,7 +95,7 @@ NK_API void CleanupNuklearImage(struct nk_image img); // Frees the #endif // NK_COS #ifndef NK_SIN #define NK_SIN sinf -#endif // NK_COS +#endif // NK_SIN #ifndef NK_INV_SQRT #define NK_INV_SQRT(value) (1.0f / sqrtf(value)) #endif // NK_INV_SQRT @@ -816,7 +816,7 @@ NK_API void UnloadNuklearImage(struct nk_image img) */ NK_API void CleanupNuklearImage(struct nk_image img) { - free(img.handle.ptr); + MemFree(img.handle.ptr); } #ifdef __cplusplus diff --git a/vendor/nuklear b/vendor/nuklear index 11d8acf..b959105 160000 --- a/vendor/nuklear +++ b/vendor/nuklear @@ -1 +1 @@ -Subproject commit 11d8acfd4fbb9d0966161fa01d58be15be1974e3 +Subproject commit b9591053ef559f707d41b7b1372036f4bea90bae