Commit Graph

2191 Commits

Author SHA1 Message Date
Benedikt Müssig cacdf6baa4
Added the arc methods to the GDI binding 2022-05-12 12:52:05 +02:00
Rob Loach a51d9eec96
Merge pull request #427 from kbolino/fix-sdl-hidpi-rendering
Fix high-DPI scaling in sdl_renderer
2022-04-20 13:51:59 -04:00
Rob Loach b71eb8dafb
Merge pull request #446 from crazyBaboon/ImproveFileBrowser
file_browser.c - remove #include <string.h>
2022-04-19 21:19:10 -04:00
Rob Loach 200032f0c2
Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into horizontal_rule 2022-04-18 23:28:25 -04:00
Rob Loach b00c8e2c86
Merge pull request #448 from tcdude/master
Button behavior `NK_BUTTON_TRIGGER_ON_RELEASE`
2022-04-18 23:26:46 -04:00
tcdude 068ae5fc33 Button behavior `NK_BUTTON_TRIGGER_ON_RELEASE`
This modifies the trigger behavior of buttons to only activate when the
mouse was also over the same button on the mouse button down event.

Side note:
I also modified my version of Nuklear I use to apply the same logic for
hover, because I use Nuklear for touch input devices where traditional
hover behavior tends to be misleading. I left this out for now because
I can imagine that this could be seen as wrong/faulty behavior by some.
2022-04-18 17:55:45 +02:00
crazyBaboon 4f2738d067
Merge pull request #1 from RobLoach/filebrowser-string
file_browser: Bring string.h to the top
2022-04-16 17:34:26 +01:00
Rob Loach c9d3a3fd20
file_browser: Bring string.h to the top 2022-04-15 17:20:20 -04:00
Wladislav ヴラド Artsimovich cb0e05beea Forgot the semicolon in nuklear.h 2022-04-15 13:35:13 +09:00
Wladislav ヴラド Artsimovich 398e338bff Forgot to regenerate nuklear.h 2022-04-15 13:27:39 +09:00
Wladislav ヴラド Artsimovich 5a75b319e4 Added nk_rule_horizontal() widget 2022-04-15 13:19:10 +09:00
crazyBaboon f58114e45e
file_browser.c - remove #include <string.h>
It is no longer necessary, since string comparison is now carried out by Nuklear API.
2022-04-13 22:44:14 +01:00
dumblob e5c44b7182
Merge pull request #445 from crazyBaboon/ImproveFileBrowser
demo: ignore case when sorting strings alphabetically in filebrowser
2022-04-13 09:43:06 +02:00
crazyBaboon e5100bcef6
Ignore case when sorting strings alphabetically 2022-04-13 01:07:41 +01:00
Rob Loach 9a244564be
Merge pull request #442 from crazyBaboon/ImproveFileBrowser
file_browser.c - Display files and folders by alphabetical order
2022-04-12 01:19:39 -04:00
crazyBaboon e3cec3b6b1
Forgot to include <string.h> 2022-04-03 15:53:49 +01:00
crazyBaboon 0163faffed
file_browser.c - Display files and folders by alphabetical order 2022-04-03 12:40:14 +01:00
Rob Loach 64c6f73630
Merge pull request #436 from crazyBaboon/ImproveFileBrowser
Further improve file_browser.c
2022-04-02 23:07:01 -04:00
crazyBaboon 8f2ccedfa4
Change dialog action from "Save" to "Open"
This is because there is yet no text box for the user to write the file name.
2022-03-29 21:00:45 +01:00
crazyBaboon 8377f9147a
Use local static variable instead of global 2022-03-26 19:34:40 +00:00
crazyBaboon a1df0c4f57
Further improve file_browser.c
-Adds visible boundary to file icon box;
-Adds a 'cancel' button that closes the file dialog;
-Adds a 'save' button that should be used for the save() routine defined by the user;
2022-03-26 18:28:49 +00:00
Rob Loach ceee8839ab
glfw_gl3: Cast the void* to a struct nk_glfw* (#434)
While it doesn't fix the issue @tree786isback in #434, it is a good thing to cast the void*'s correctly.
2022-03-22 11:22:22 -04:00
Ludwig Füchsl 1b028c654c
Merge branch 'Immediate-Mode-UI:master' into gdi_nuklear_native_window 2022-03-21 16:34:11 +01:00
dumblob 9d8f86f223
Merge pull request #432 from crazyBaboon/ImproveFileBrowser
demo: better display file icons in the filebrowser
2022-03-21 10:56:50 +01:00
crazyBaboon ec14ad2a30
Better Display file icons in the filebrowser
Icons are now displayed in a "Compact list view" rather than a "icon view"
2022-03-19 22:17:33 +00:00
Kristian Bolino 04eac1db2a Scale font height rather than oversampling 2022-03-16 17:01:39 -04:00
dumblob acb8fa6027
Merge pull request #430 from crazyBaboon/crazyBaboon-clean_up
cleanup: delete extra copy of stb_image.h
2022-03-16 21:36:08 +01:00
crazyBaboon 24311a60c2
Delete extra copy of stb_image.h 2022-03-16 19:57:35 +00:00
Kristian Bolino 779c420d06 Fix C89 warnings and oversample at 3x scale 2022-03-15 18:10:01 -04:00
Kristian Bolino ec4aa9992f Fix high-DPI scaling in sdl_renderer
This commit resolves two issues with high-DPI display rendering:

1. The coordinates were not scaled properly, resulting in tiny output
   and misalignment of actual cursor position with apparent position;
   this is fixed by calling SDL_SetRenderScale with appropriate scaling
   factors determined by comparing the window size to the renderer's
   output size
2. The fonts were not oversampled, resulting in excessively blurry text;
    this is fixed by setting oversample_h and oversample_v on the
    font_config according to the scaling factors
2022-03-15 11:43:31 -04:00
Kristian Bolino cbfc8f89e9
sdl_renderer: fix Metal rendering (#426)
Addresses an issue where the Metal render driver (macOS) could not handle the clipping rectangle {-8192, -8192, 16384, 16384} and would simply draw nothing to the screen. The solution is to ensure the cliprect coordinates are not negative, which also doesn't break the other render drivers.

Co-authored-by: Kristian Bolino <kbolino@kbolino.com>
2022-03-15 15:28:47 +01:00
crazyBaboon f0dccaeeec
Integrate file browser with glfw opengl2 demo (#400) and restructure demo/ directory accordingly 2022-03-14 20:46:44 +01:00
Ludwig Füchsl a31c6c0089 Bug fix & Added comments 2022-03-04 13:16:47 +01:00
Ludwig Füchsl 33395aabdb Fixed non displayed windows.
WARNING: Drawing is not done correctly
2022-02-28 15:53:54 +01:00
Ludwig Füchsl 169470d2e3 Converted from C++ to C
WARNING: Is currently not working! Needs more debugging.
2022-02-28 14:57:47 +01:00
Ludwig Füchsl d4e695420d Added GDI full featured window code 2022-02-25 11:13:01 +01:00
dumblob 10ecc825cc
Merge pull request #412 from Ohjurot/d3d12_backend
backend: add D3D12
2022-02-24 10:22:19 +01:00
Ludwig Füchsl cb59055c06 Added some API dokumentation 2022-02-14 22:41:32 +01:00
Ludwig Füchsl 703d73aebf Added D3D12 backend and demo 2022-02-14 20:51:28 +01:00
dumblob 3e834293ad
Merge pull request #406 from Immediate-Mode-UI/inv_sqrt
Allow overriding the NK_INV_SQRT function as planned.
2022-02-07 18:24:49 +01:00
Rob Loach 429eaf3892
Merge pull request #409 from Immediate-Mode-UI/sdl_renderer-fix-cast
Fix incorrect cast on SDL_RenderGeometryRaw()
2022-02-06 15:29:57 -05:00
Rob Loach 6686ab1dd5
Fix incorrect cast on SDL_RenderGeometryRaw()
Fixes #405
2022-02-06 00:43:54 -05:00
Rob Loach d13cc80b6e
Merge pull request #403 from lib-omar/lib-omar-patch-1
SDL demos: Favor switch over if-else chain in event handler.
2022-02-06 00:29:24 -05:00
Rob Loach e20240b84f
Update clib.json to 4.9.6 2022-02-03 15:35:58 -05:00
Rob Loach f60e50232a
Allow overriding the NK_INV_SQRT function 2022-02-03 15:30:39 -05:00
lib-omar f6851ea2ca
Favor switch over if-else chain in event handler. 2022-01-29 14:19:32 -05:00
lib-omar 811dbacd12
Favor switch over if-else chain in event handler. 2022-01-29 14:18:07 -05:00
lib-omar 43b5e82748
Favor switch over if-else chain in event handler. 2022-01-29 14:15:02 -05:00
lib-omar 8f5ae21035
Favor switch over if-else chain in event handler. 2022-01-29 14:13:34 -05:00
Rob Loach 9486833f61
Merge pull request #396 from Immediate-Mode-UI/br_example_sdl_rendergeometry
Backend: SDL2 Renderer
2022-01-09 18:13:28 -05:00