Commit Graph

10 Commits

Author SHA1 Message Date
Rob Loach
7f5c642bb3
Standardize INCLUDE_OVERVIEW defines 2024-04-25 16:49:50 -04:00
Rob Loach
4cfea49522
Remove STYLE_ defines as we have the style dropdown 2024-04-25 16:37:07 -04:00
paccer
e3b0f24626 Fix missed grab state changes in SDL demos
Move grab handling out of `nk_sdl_handle_event` to `nk_sdl_handle_grab`,
which is now called outside of the event loop.
This change makes the logic similar to the GLFW demos and fixes issues
with missed grab state changes and mouse cursor disappearing.
2024-02-10 03:03:16 +01:00
Richard Gill
54cd692d17 added comment on ifdefs to use styles in demos 2022-10-13 11:51:50 +02:00
Richard Gill
fc5ce1c495 demos: set style with defines
To avoid having to modify the demo code,
conditionnally include a predefined style
2022-10-12 21:19:58 +02:00
Kristian Bolino
04eac1db2a Scale font height rather than oversampling 2022-03-16 17:01:39 -04: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
crazyBaboon
f0dccaeeec
Integrate file browser with glfw opengl2 demo (#400) and restructure demo/ directory accordingly 2022-03-14 20:46:44 +01:00
Rob Loach
cd4990834f
sdl_renderer: Update code 2022-01-06 21:55:20 -05:00