diff --git a/CMakeLists.txt b/CMakeLists.txt index 330b6de..401cf01 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.0.1 + VERSION 4.0.3 LANGUAGES C ) diff --git a/examples/raylib-nuklear-font.c b/examples/raylib-nuklear-font.c index 67b6a4a..6478ffe 100644 --- a/examples/raylib-nuklear-font.c +++ b/examples/raylib-nuklear-font.c @@ -37,7 +37,7 @@ int main(void) //-------------------------------------------------------------------------------------- const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "[raylib-nuklear] example"); + InitWindow(screenWidth, screenHeight, "[raylib-nuklear] font example"); Font font = LoadFont("resources/anonymous_pro_bold.ttf"); SetTargetFPS(60); // Set our game to run at 60 frames-per-second diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 3774bcf..0d4b172 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,4 +1,4 @@ -# raylib-nuklear +# raylib_nuklear add_library(raylib_nuklear INTERFACE) target_include_directories(raylib_nuklear INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) install(FILES diff --git a/include/nuklear.h b/include/nuklear.h index 2a9de15..6699d61 100644 --- a/include/nuklear.h +++ b/include/nuklear.h @@ -20444,10 +20444,15 @@ nk_window_is_hovered(struct nk_context *ctx) { NK_ASSERT(ctx); NK_ASSERT(ctx->current); - if (!ctx || !ctx->current) return 0; - if(ctx->current->flags & NK_WINDOW_HIDDEN) + if (!ctx || !ctx->current || (ctx->current->flags & NK_WINDOW_HIDDEN)) return 0; - return nk_input_is_mouse_hovering_rect(&ctx->input, ctx->current->bounds); + else { + struct nk_rect actual_bounds = ctx->current->bounds; + if (ctx->begin->flags & NK_WINDOW_MINIMIZED) { + actual_bounds.h = ctx->current->layout->header_height; + } + return nk_input_is_mouse_hovering_rect(&ctx->input, actual_bounds); + } } NK_API nk_bool nk_window_is_any_hovered(struct nk_context *ctx) @@ -22234,7 +22239,6 @@ nk_spacer(struct nk_context *ctx ) - /* =============================================================== * * TREE @@ -29613,14 +29617,16 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args) /// ## Changelog /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none -/// [date][x.yy.zz]-[description] -/// -[date]: date on which the change has been pushed -/// -[x.yy.zz]: Numerical version string representation. Each version number on the right -/// resets back to zero if version on the left is incremented. -/// - [x]: Major version with API and library breaking changes -/// - [yy]: Minor version with non-breaking API and library changes -/// - [zz]: Bug fix version with no direct changes to API -/// +/// [date] ([x.y.z]) - [description] +/// - [date]: date on which the change has been pushed +/// - [x.y.z]: Version string, represented in Semantic Versioning format +/// - [x]: Major version with API and library breaking changes +/// - [y]: Minor version with non-breaking API and library changes +/// - [z]: Patch version with no direct changes to the API +/// +/// - 2021/12/22 (4.9.5) - Revert layout bounds not accounting for padding due to regressions +/// - 2021/12/22 (4.9.4) - Fix checking hovering when window is minimized +/// - 2021/12/22 (4.09.3) - Fix layout bounds not accounting for padding /// - 2021/12/19 (4.09.2) - Update to stb_rect_pack.h v1.01 and stb_truetype.h v1.26 /// - 2021/12/16 (4.09.1) - Fix the majority of GCC warnings /// - 2021/10/16 (4.09.0) - Added nk_spacer() widget @@ -29964,3 +29970,4 @@ 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. */ + diff --git a/vendor/nuklear b/vendor/nuklear index 56be88e..9486833 160000 --- a/vendor/nuklear +++ b/vendor/nuklear @@ -1 +1 @@ -Subproject commit 56be88e73fa8f17f1b2a22c726ae1d1c1de06653 +Subproject commit 9486833f617c6c50d15f6040f184ca9f2c98c6ad