Commit Graph

557 Commits

Author SHA1 Message Date
Robert Winkler b6d5293dfb Add NK_KEYSTATE_BASED_INPUT changes to src files
Updated nuklear_input.h CHANGELOG and HEADER and regenerated nulear.h
2018-10-31 12:42:30 -07:00
Robert Winkler 1a6c30693f Add NK_KEYSTATE_BASED_INPUT documentation comment 2018-10-30 16:51:45 -07:00
Robert Winkler 36a8d2a5ad Fix issue 548
The issue was introduced in the fix for 416 (commit 8559aeb).

The original problem was (backspace and arrows moving too fast) is not a
nuklear problem but a GLFW problem.  Because of the way nuklear handles
input (it must be between input_begin and end), the key callback method
GLFW offers is not an option.

So we have to use glfwGetKey() which returns the current state of a key
not whether it was just pressed or released, so nuklear acts like it
was pressed every single frame, hence the "too fast" problem.

The fix checks for state change and discards the event if there was
no change.  This kills key repeat behavior (for named keys) on
*all* platforms which makes deleting or arrowing inconvenient.

Since there's no way to fix the shortcomings of a callback vs event
based input API, my "fix" just makes the original fix conditional
on a macro NK_KEYSTATE_BASED_INPUT
2018-10-30 00:43:01 -07:00
Micha Mettke 19c14bb777
Merge pull request #726 from grynca/master
fix unaligned access in murmur hash
2018-10-21 00:20:34 +02:00
grynca 9ee9dca307 unwinding memcpy to 4x byte assignments 2018-09-05 19:35:16 +02:00
Micha Mettke 0275cc5789
Merge pull request #711 from Lusted4ever/master
Boundings width adjusting, removal of gaps. (rounding errors)
2018-08-30 20:34:06 +02:00
Maxim Kasperski 9c87b9f5e5
Update nuklear.h 2018-08-30 12:33:03 +03:00
Micha Mettke 744cd2cc93
Merge pull request #729 from diggit/fixes
Fixes of scrollbar drag and dynamic panel footer filling
2018-08-29 21:18:45 +02:00
Micha Mettke 997e6cc981
Merge pull request #730 from FredrikHson/master
make the size of nk_draw_index an option.
2018-08-29 21:17:15 +02:00
Micha Mettke 4ff9fe6dc6
Merge pull request #725 from quink-black/fix-nk_begin_titled
nuklear_window: fix misleading variable names
2018-08-29 21:15:30 +02:00
Micha Mettke 961b411123
Merge pull request #716 from quink-black/dev
Fix NK_INT8 type
2018-08-29 21:14:52 +02:00
Fredrik Hansson 26c6e246b7 changed the boolean logic for the assert for the size of nk_draw_index 2018-08-27 21:33:02 +02:00
Fredrik Hansson 2b03f44898 make the size of nk_draw_index an option, also make the documentation a bit more clear. 2018-08-27 10:01:53 +02:00
Fredrik Hansson 5cea113a9c fix #718 by moving all the changes to src/nuklear.h 2018-08-27 09:38:05 +02:00
diggit e86fcabce7 fix scrollbar dragging behavior, similar to #688 2018-08-26 11:26:57 +02:00
diggit b17df7b463 fix wrong dynamic panel footer filling 2018-08-26 11:23:27 +02:00
diggit 6473a45543 Regenerate nukelar.h, unfortunately reverts #718
this elimites changes from #718 because they were done in generated file and not in sources. See PR thread for more info.
2018-08-26 02:10:40 +02:00
grynca 0101b3a0a7 fix unaligned access in murmur hash 2018-08-19 12:38:12 +02:00
Zhao Zhili 6fce4d209f nuklear_window: fix misleading variable names 2018-08-15 23:15:23 +08:00
Peter d3f57da54c Various small documentation changes and typo fixes. 2018-07-25 08:36:09 +02:00
Zhao Zhili f8bcf22960 Fix NK_INT8 type 2018-07-21 15:55:09 +08:00
Lusted4ever cac6ca59d7
Removed gaps, caused by dynamic layouting 2018-07-07 12:46:13 +03:00
vurtun f42a76e176 Fixed #684 2018-06-10 17:40:55 +02:00
vurtun b5eb3cd885 Fixed gcc integer conversion warning 2018-06-10 17:25:29 +02:00
diggit da07a235ab fix window dragging behavior (ignore on click) 2018-05-22 14:13:31 +02:00
vurtun b1209dbb2e Corrected separation 2018-05-14 15:41:16 +02:00
vurtun ae845fcb0b Fixed single-header packing mistake 2018-05-14 15:32:19 +02:00
Tom Mason b7725b4a89 fix scrollbar crash
Copy paste mistake was checking the background type for the cursor style,
leading to a crash if background was image type and cursor was color, as
it would try to use the cursor color as a texture.
2018-05-07 10:36:20 +02:00
vurtun 823f79f856 Second attempt to fix #675 2018-04-23 16:17:24 +02:00
vurtun f79b080d84 Fixed #674 popup and contextual combination problems 2018-04-23 11:06:18 +02:00
vurtun da3f7fed6c Fixed #675 List view 2018-04-23 11:01:06 +02:00
vurtun 0981c1a321 Fixed #677 contextual right-click behavior
Closing a contextual menu by right click caused invalid behavior and
bocking. In addition having consecutive contextual menus and closing an
earlier menu will wrongfully open a following menu. Both are now fixed.
2018-04-23 10:55:35 +02:00
Micha Mettke b91a815c82
Merge pull request #668 from nsawa/Fix_VC_warning_cannot_convert_parameter
Fix: VC++ warning cannot convert parameter.
2018-04-15 10:38:37 +02:00
vurtun d5f32ee6f9 Fixed `nk_tree_element_push_id` macro 2018-04-15 10:34:53 +02:00
Naoyuki Sawa 9c6896c1ed Fix: VC++ warning cannot convert parameter. 2018-04-15 10:53:29 +09:00
vurtun 3f99a80f11 Added selectable tree nodes #626 2018-04-14 13:57:25 +02:00
vurtun 907db51a95 Merge branch 'pr_valist' of https://github.com/AntiBlueQuirk/nuklear into AntiBlueQuirk-pr_valist 2018-04-06 11:39:33 +02:00
AntiBlueQuirk 1ec96233a6 Fixing merge error 2018-04-05 12:57:21 -05:00
AntiBlueQuirk e99a04bc03 Adding va_list versions of varargs functions 2018-04-05 11:17:26 -05:00
AntiBlueQuirk 47bc15f37f Fixed a case where rendering would assert if a temporary buffer failed to be allocated
Other parts of the draw_list code simply fail more or less silently when the
buffers fill up. The user could allocate bigger buffers and try again, except
that these particular functions assert when they fail to allocate the buffer.
2018-04-05 11:03:27 -05:00
vurtun d374953d27 Fixed #657 contextual activation code 2018-04-04 16:43:09 +02:00
vurtun f5aa92c5ca Seperated single header out into multiple files
Nuklear now comes in two flavours. For ones there is the single-header
version for distribution and multiple files inside the /src folder for
development and better readability. Since I don't want to manually
update each version if the other changes the /src directory includes a
python script developed by Apoorva Joshi to pack all files inside the
directory into a single header file.
2018-04-02 18:06:12 +02:00
Micha Mettke 2825f3492e
Merge pull request #655 from Artomatix/master
Make text edit scroll less when typing past the end
2018-04-01 04:12:58 -07:00
vurtun 253f73c976 Fixed #656 Single frame multi-calling `nk_convert`
It is now possible to call `nk_convert` multiple times in a single
frame.
2018-04-01 13:09:22 +02:00
vurtun 1caba3a5c9 BREAKING CHANGE! Changed `nk_clear` behavior #656
Previously `nk_clear` with optional vertex output enabled would try and
clear each passed buffer from `nk_convert` if called. Problems arise
if each buffer was specified previously in own code block outside
`nk_clear`.

Overall the buffer clearing was an overreaching measure of `nk_clear`
and I hope not to many tried to make use of it. In general the buffer
is owned by the user of nuklear and not nuklear itself.
Therefore it does not make sense for nuklear to access it after
`nk_convert` was successfully completed.

Sorry for any inconvenience caused by this breaking change.
2018-04-01 12:36:56 +02:00
Aneesh Roy 33d8b8f187 Text edit scrolls less when typing past the end 2018-03-30 14:04:30 +01:00
vurtun 94c0412a08 Fixed #647 window open/close flickering
Opening and closing a set of windows with at least one other window
active caused flickering if a window as closed. Reason was a missing
check inside `nk_build` that did not skip newly closed windows.

I am not 100% sure but this could also affect #637 but I still needs to
be tested.
2018-03-20 11:22:04 +01:00
vurtun 20cd35c0fb Added `nk_image_color` back into API #645
No idea what happend but for some reason I accidentally removed
`nk_image_color`. I don't think there is any reason why it should have
been removed so I added it back in.
2018-03-14 16:36:00 +01:00
Sergey Semushin 76107a2cd2 Make ctx->begin 0 if ctx->end became 0.
Fixes #634.
2018-03-02 09:23:37 +03:00
vurtun 45193dc6dd Fixed #636 slider dragging behavior 2018-02-23 22:51:08 +01:00
vurtun 05fed4f833 Fixed changelog dates to correct year 2018-02-21 23:20:39 +01:00
vurtun 1626610040 Added additional documentation on `nk_property_xxx` 2018-02-17 20:20:07 +01:00
Zach Ploskey 5a79427453
Correct doc comments for nk_window_get_height 2018-02-10 11:08:52 -08:00
vurtun 39e1041c07 Fixed #580 miscalculated baked cursor bake size 2018-01-31 14:52:43 +01:00
vurtun 533b7fc083 Fixed #615 stb_truetype name collision 2018-01-31 11:53:44 +01:00
vurtun f8dfddd732 Applied patch from #603 for panel border drawing 2018-01-28 11:48:44 +01:00
vurtun 11c81d4631 Fixed accidental code remove in last commit 2018-01-15 23:31:15 +01:00
vurtun c36a167127 Added tree documentation 2018-01-15 19:30:57 +01:00
vurtun da8273c4c6 Added `nk_group_begin_titled` 2018-01-12 18:35:36 +01:00
vurtun c9189a250b Finished documenation conversion 2018-01-09 12:15:44 +01:00
vurtun 8027ebe0ee Second last doc conversion commit 2018-01-08 16:08:38 +01:00
vurtun 8709a881f0 Added input documentation translation 2018-01-08 02:21:21 +01:00
vurtun 9a314f0e29 Finised context documentation translation 2018-01-07 22:59:27 +01:00
vurtun dd5f3520a0 Started documentation transition to markdeep 2018-01-07 17:18:02 +01:00
Naoyuki Sawa 83e2c109d5 Fix nk_colorf_hsva_f alpha calculation 2018-01-06 08:52:26 +09:00
vurtun 604a7dfa42 Merge branch 'master' of https://github.com/vurtun/gui 2018-01-05 12:33:49 +01:00
vurtun bd30c124a6 Fixed #544 color picker (breaking change) 2018-01-05 12:32:42 +01:00
Martin Gerhardy acaab2f46a Fixed implicit fallthrough warning 2018-01-04 21:34:53 +01:00
vurtun 5bbe337399 Removed docu typo 2018-01-02 11:08:10 +01:00
vurtun f08b62039f Split license into dual license MIT/public domain 2018-01-02 10:47:08 +01:00
vurtun 07e422ecd1 Fixed warnings found by gcc and clang 2018-01-01 17:18:52 +01:00
vurtun 023c2da494 Fixed define intendation 2018-01-01 15:45:09 +01:00
vurtun 683185e762 Merge branch 'issue585' of https://github.com/mgerhardy/nuklear into mgerhardy-issue585 2018-01-01 15:41:57 +01:00
Martin Gerhardy 61143c3400 Fixed issue #585 2017-12-31 17:37:02 +01:00
Martin Gerhardy 107c920fb0 Fixed second part of issue #584 2017-12-31 17:29:52 +01:00
vurtun 87d3e9f3ad Added documentation for group 2017-12-29 11:43:36 +01:00
vurtun f83c8648b7 Fixed #583 small warning in GCC 2017-12-25 18:31:16 +01:00
vurtun b6e0e34c9c Fixed #582 nk_edit_buffer behavior
Fixed bug in nk_edit_buffer that prevents input after activating the
widget. It was caused but not correctly setting an internal flag for
input.
2017-12-23 17:34:41 +01:00
vurtun b2b08061c7 Fixed #581 progressbar drawing and behavior
1.) Fixed a visual overdraw glitch on full progressbar
2.) Fixed input behavior so you can actually fill the progressbar by
    user input
2017-12-23 09:55:57 +01:00
NuklearBomb 1c07ceaac2
nk_layout_peek() bugfix
Fixes boundary fetching issues present in widgets organized by row templates.
2017-12-07 22:08:11 -05:00
vurtun f7833d0379 Fixed #569 and added additional formated tooltip 2017-12-04 13:23:18 +01:00
vurtun 2fda853572 Fixed #567 fread size calculation 2017-12-02 13:17:00 +01:00
vurtun 16c6f2ae87 Fixed #560 nk_font_atlas_add 2017-12-02 12:26:30 +01:00
vurtun 0c4d93e177 Fixed #563 nk_font_atlas_cleanup behavior 2017-11-29 14:05:13 +01:00
vurtun 5fbcdd0f58 Fixed #560 loading multiple fonts 2017-11-28 12:21:12 +01:00
vurtun 054136075c Fixed warnings and UB in demo code 2017-11-27 20:44:13 +01:00
vurtun 3636cb1c5d Fixed #511 and changed formatting 2017-11-27 20:27:02 +01:00
Sergey Semushin 988b40888b Fix NK_INCLUDE_COMMAND_USERDATA usage with images.
If userdata is used with drawing images userdata was missing from
the first image command and also subsequent commands which draw the
same texture but with different user data were incorrectly merged together.
2017-11-25 09:36:37 +03:00
vurtun 56b2612a91 Fixed #558 NK_WINDOW_NO_INPUT hidding windows bug 2017-11-18 19:55:17 +01:00
vurtun 37a00a5f13 Fixed #555 closing minimized windows and drawing bug
Fixed missing skips of closed minimized windows in garbage collections
state and drawing procedure.
2017-11-16 13:14:00 +01:00
vurtun 6a13addb21 Fixed #413 font merging 2017-11-15 15:22:11 +01:00
NuklearBomb e76ba09ec6
Use NK_DTOA in function nk_do_property
This modification makes it so the nk_do_property() function uses the user-defined NK_DTOA function instead of the internal nk_dtoa() function, as per the description below "Optional Defines":
    NK_DTOA
        You can define this to `dtoa` or your own double to string conversion
        implementation replacement. If not defined nuklear will use its own
        imprecise and possibly unsafe version (does not handle nan or infinity!).
        <!> If used it is only required to be defined for the implementation part <!>
Keep up the great work on Nuklear, really enjoying it so far!
2017-11-14 10:29:58 -05:00
Naoyuki Sawa 2f269f4df0 Fix: gcc warning unused variable. 2017-11-08 09:05:46 +09:00
vurtun 7eb08b8bcf Fixed #545 with window pos/size modifier 2017-11-07 18:18:50 +01:00
vurtun 5d72fe5f86 Merge branch 'nuklear_softrast' of https://github.com/siro20/nuklear into siro20-nuklear_softrast 2017-10-07 14:01:22 +02:00
Roman Akberov 31c88a8ccf Use correct style for progressbar cursor. 2017-09-24 18:22:23 +02:00
Valera Rozuvan 55206c7bea Add comment to closing #endif statement
I think this adds more clarity to the library. I.e. that it is organized into 2 large #define statements. The first large statement (`NK_NUKLEAR_H_`) has a comment for it's closing `#endif` statement. The second one (`NK_IMPLEMENTATION`) does not.
2017-09-19 16:15:21 +03:00
Valera Rozuvan 1b1b04fec0 Fix comment for closing #endif
I believe it should be `NK_NUKLEAR_H_` instead of `NK_H_`.
2017-09-17 22:25:32 +03:00
vurtun 9059628b16 Fixed #517 second attempt 2017-09-14 14:53:38 +02:00
vurtun b774329a2e Fixed #516 nk_edit_buffer and nk_edit_focus 2017-09-14 14:48:43 +02:00
vurtun 43b41f92bd Fixed window closing behavior
If a window was closed the remaining windows remain in read only mode.
This wrong behavior is now fixed.
2017-09-14 14:09:33 +02:00
vurtun 3b5123f523 Fixed #517 --!!BREAKING CHANGE!!--
Since directly modifing window position and size between function calls
nk_begin and nk_end causes drawing errors it is now required to be set
_OUTSIDE_. For that reason each modifing function now takes in the name
of the window to modify. Sorry for the inconvenience.
2017-09-14 12:59:33 +02:00
vurtun 31674e4b09 Fixed #503 background window flag
Fixed anotherr background window flag in case the background window is
defined last.
2017-09-11 12:47:37 +02:00
vurtun afa76f52ab Fixed #502 nk_item_is_any_active for hidden window 2017-08-27 17:12:19 +02:00
vurtun 7c089a5f09 Fixed #503 NK_WINDOW_BACKGROUND flag behavior
The window background flags was pretty much broken at this point. It
would completly block all input for each window. The fix itself is quite
dirty but hopefully everything works correctly now.
2017-08-27 16:57:40 +02:00
vurtun a2472f8c36 Fixed #501 incorrect documentation for nk_input_scroll 2017-08-21 11:15:17 +02:00
reujab 4a82680e23 corrected line count 2017-08-19 18:48:52 -04:00
StillWarter e454fcf8d1 nk_iceilf now returns correct value when x >= 0 2017-08-19 12:45:00 +08:00
Ettore Sergey Torti 2a30c4f74b Fix typos in comments 2017-08-15 15:20:57 +02:00
vurtun bee9037028 Converted C++ comments to C89 and added reference
Single line comment are a feature of C++ and C99 and above while C89 only
supports multiline comment /**/. In addition I added an additional
reference for the addition and subtraction formulae.
2017-08-12 17:53:37 +02:00
vurtun 4ba164c17b Merge branch 'master' of https://github.com/ettoretorti/nuklear into ettoretorti-master 2017-08-12 17:37:14 +02:00
Ettore Sergey Torti f4171e8fa6 Optimize arc drawing for fewer sin/cos calls
Change nk_draw_list_path_arc_to so that it calls sin and cos 4 times
instead of (segments * 2) times. This is achieved through the use of
the trigonometric angle addition identities.
2017-08-11 19:35:59 +02:00
Np3w 2f56f8b890 More code style 2017-08-11 17:23:53 +02:00
Np3w 7abda4436b Fix code style 2017-08-11 17:22:52 +02:00
Np3w 4920522b62 Make nk_window_is_hovered care about NK_WINDOW_HIDDEN flag 2017-08-11 17:16:45 +02:00
Naoyuki Sawa 9eed01d431 Fix gcc warning 'unused variable'. 2017-07-24 10:52:03 +09:00
vurtun ebee71661e Fixed #485 widget is hovered/clicked outside window 2017-07-23 10:09:18 +02:00
vurtun 9a9f4f063d Fixed #479 drawing bug for lines/rectangles 2017-07-17 23:00:03 +02:00
vurtun 6326b5de08 Fixed #406 bug causing infinite loop 2017-07-17 22:00:44 +02:00
vurtun 8e48b99f09 Fixed #477 segfault on full table 2017-07-07 20:26:48 +02:00
vurtun 900bca9ac3 Removed unneeded semicolon in C++ NK_ALIGNOF version 2017-07-06 10:36:02 +02:00
vurtun 83636d4566 Fixed #472 with draw lines smaller/equal zero 2017-06-30 16:35:03 +02:00
Micha Mettke 170fbf26e4 Merge pull request #468 from nsawa/fix_warning_in_nk_layout_reset_min_row_height
fix: warning unused variable in nk_layout_reset_min_row_height()
2017-06-30 16:32:56 +02:00
Naoyuki Sawa 0f4225aa1e In revision 4741669, gcc 2.7.2 generates a warning in the function nk_layout_reset_min_row_height():
warning: unused variable `font'
2017-06-22 09:33:17 +09:00
vurtun 4741669c3d Finished documentation for layouting 2017-06-21 20:52:27 +02:00
vurtun ef78999cd4 Fixed documentation for last change 2017-06-21 12:46:12 +02:00
vurtun 14e0847e98 Made last auto layout change non-breaking
Auto layouting now only happens if you pass zero for row height in any
of the layouting functions.
2017-06-21 12:41:54 +02:00
vurtun 3c6d32db7a Fixed tree visual bug caused by min layout height 2017-06-21 12:25:51 +02:00
vurtun ecd16919bb Merge branch 'master' of https://github.com/vurtun/gui 2017-06-21 12:19:49 +02:00
vurtun e13aae2087 BREAKING: Auto row height derived from font height
From now on internally nuklear will keep a minimum row height that is
derived from currently select font. If you want to have a row smaller
than that you can call `nk_layout_set_min_row_height` and reset the
value back by calling `nk_layout_reset_min_row_height`.
2017-06-21 12:18:21 +02:00
Micha Mettke 0dbe53a77e Merge pull request #466 from wheybags/newline_fix
fix accidental windows newlines
2017-06-16 12:46:04 +02:00
Tom Mason 9fc0efe7b0 fix accidental windows newlines 2017-06-16 10:46:29 +01:00
Tom Mason 8d8c39249a fix nk_plot functions triggering assert when drawing offscreen 2017-06-16 10:42:41 +01:00
Tom Mason d59c879380 Zero nk_text_edit structs before initialising in nk_textedit_init_*
Fixes issue with uninitialised memory. Didn't move the memset call into
nk_textedit_clear_state because that function is used elsewhere, and you
don't always want to completely clear the struct when you call it.
2017-06-14 15:44:17 +01:00
vurtun 5c0ef785ee Fixed #458 property behavior bug 2017-06-09 19:24:53 +02:00
vurtun a79a0837ba Added additional layouting utility function 2017-06-08 17:56:59 +02:00
vurtun d3a6dc0d30 Merge branch 'master' of https://github.com/vurtun/gui 2017-06-06 20:31:51 +02:00
vurtun 26cd84382d Fixed #453 return flag for dynamic command buffer 2017-06-06 20:30:33 +02:00
Martins Mozeiko e14dd1cb1b Demo using Direct3D 9 for rendering 2017-06-05 21:09:16 -07:00
Panagiotis Christopoulos Charitos 200017dab8 Make the font ptr const in nk_style_push_font 2017-05-25 23:00:39 +02:00
vurtun 530266b8e8 Merge branch 'master' of https://github.com/vurtun/gui 2017-05-23 15:21:21 +02:00
vurtun 7bd467935b Fixed #442 Activation of partially visible widgets 2017-05-23 15:20:44 +02:00
Tom Mason aa6bd5a8ec remove typoed/duplicated function declaration 2017-05-23 11:20:54 +01:00
vurtun d4f518168b Fixed #439 missing zeroing in nk_font_atlas_cleanup 2017-05-23 09:12:52 +02:00
vurtun d9a57d42cd Fixed panel scaling to behave like windows native 2017-05-10 12:35:52 +02:00
vurtun 70d9de10c9 Fixed scrollbar drawing bug if not enough space 2017-05-09 21:22:09 +02:00
vurtun 9ed3eeec8d Fixed scaler dragging behavior #432 2017-05-09 20:03:51 +02:00
Norbert Nopper 621e233217 Removed compiler GCC warning. 2017-05-09 09:53:48 +02:00
vurtun 9dc7323b74 Added platform double click support #412 2017-05-06 18:50:32 +02:00
Patrick Rudolph e888338498 Introduce define for software fonts
Add NK_INCLUDE_SOFTWARE_FONT to allow font generation without
the need to have vertexbuffers.

Required for software rasterization.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2017-05-01 10:15:36 +02:00
vurtun 012170b308 Added additional batch of documentation 2017-04-27 21:34:14 +02:00
vurtun 8559aebaed Fixed key repeat #416 in `nk_input_key` 2017-04-20 18:14:24 +02:00
vurtun 4c39852182 Fixed #405 and added property select and clipboard 2017-04-20 11:57:36 +02:00
vurtun 43a4f3ec82 Fixed `nk_edit_flags` sequence 2017-04-10 19:47:21 +02:00
vurtun 945dc5aeb1 Fixed #403 with another floating pointer error 2017-04-10 19:21:02 +02:00
vurtun d68a9cf5ed Added first batch of documentation 2017-04-09 16:46:13 +02:00
vurtun 1995518b0d Added additional input window flags #399 2017-04-09 16:18:09 +02:00
Micha Mettke e4c800a242 Merge pull request #398 from rokups/fix/nk_convert-graceful-failure
Allow graceful failure of nk_convert()
2017-04-09 15:52:12 +02:00
vurtun 89e6ed6b5a fixed #395 heap corruption in `nk_buffer` 2017-04-09 15:51:08 +02:00
Rokas Kupstys bbb8190ad4 Removed two asserts in order to allow nk_convert() to gracefully fail when buffers do not provide enough space. 2017-04-09 16:04:01 +03:00
vurtun 7d5648db30 Added result flags to `nk_convert` 2017-04-08 09:46:40 +02:00
Naoyuki Sawa b3963bf731 Fix gcc warning in nk_end(). 2017-04-05 10:30:07 +09:00
vurtun 274d9c416b Merge branch 'master' of https://github.com/vurtun/gui 2017-04-04 19:02:16 +02:00
vurtun 67f266a560 Fixed #388 crashing hidden window on popup click 2017-04-04 16:31:12 +02:00
Micha Mettke 58b7faff4e Merge pull request #389 from rokups/fixes
Several fixes
2017-04-04 16:17:21 +02:00
Cong 9b9f88e907 Remove redundant assign 2017-04-02 13:57:45 +10:00
Rokas Kupstys 80db75a068 Fix using uninitialized variable as condition. 2017-03-30 15:11:42 +03:00
Naoyuki Sawa b24329d34a fix: warning unused variable in nk_finish() 2017-03-26 10:06:09 +09:00
vurtun 2a0942f04f Fixed #378 popup blocking `NK_WINDOW_BACKGROUND` windows 2017-03-25 14:57:44 +01:00
vurtun 944af0eb4c Fixed windows closing behavior 2017-03-25 09:12:38 +01:00
vurtun 23eea231d8 Added horizontal scrolling 2017-03-21 21:21:58 +01:00
vurtun a979372909 Fixed #375 long window title drawing bug 2017-03-18 22:34:13 +01:00
vurtun 99ea7c4b53 Fixed const warnings 2017-03-15 18:18:00 +01:00
Cong 2e4db87ed1 Remove const cast of endptr in nk_strto* functions
Change `endptr` to `const char **` and avoid const cast.
Should not break existing code passing `char **` as `endptr`.
2017-03-15 22:22:53 +11:00
Cong 7134bf73b5 Fix unary operator clang warning 2017-03-12 22:43:18 +11:00
Micha Mettke e6a6fe5b21 fixed #363 wrong example in documentation 2017-03-09 10:50:30 +01:00
vurtun d5ea545a2b Hopefully fixed #362 text input filtering 2017-03-04 13:56:40 +01:00
vurtun 284772c00d fixed #361 group closable window flag 2017-03-04 13:10:33 +01:00
vurtun e5c1cf9d70 Cleaned up custom draw commands to better fit
Had to change some small things to make everything work for a
general case instead of vertex draw list only. Furthermore I
don't want a custom widget inside nuklear so I removed it.
Feel free to add it back into your own version.
2017-02-25 22:50:37 +01:00
ClaasJG 4c25cd34f5 Added a new command type: NK_COMMAND_CUSTOM
Added a new command type 'NK_COMMAND_CUSTOM'.
A custom command contains a callback that will be called to fill the draw list.

Usage: 
static void custom_convert(struct nk_draw_list *list,
    short x, short y, unsigned short w, unsigned short h,
    nk_handle callback_data){/*Fill draw list.*/}

[...]nk_begin[...]
nk_custom(ctx, customConvert, nk_handle_id(0));

The handle can be used to pass data.
2017-02-25 14:13:08 +01:00
vurtun 064e31f3db Added assert to prevent group with closable flag 2017-02-24 19:18:42 +01:00
Anton Bondarev aac2d71740 Make NK_API 'static inline' for NK_PRIVATE version
Fixed definition for C89 standard
2017-02-13 13:39:56 +03:00
Anton Bondarev 6fa8424d6e Make NK_API 'static inline' for NK_PRIVATE version 2017-02-06 16:43:33 +03:00
Dmitry Hrabrov 9cd5d035c3 Remove warning "unsigned only in ISO C90"
These warnings appear on GCC for Windows only. There a lot of them. Doesn't matter, native compilation or crosscompile.
`nuklear.h:6836:9: warning: this decimal constant is unsigned only in ISO C90`
2017-01-30 15:57:28 +03:00
vurtun ef2dcd3b77 Added function to remove edit focus #321 2017-01-24 23:06:59 +01:00
Micha Mettke 3123ba0167 Merge pull request #330 from DeXP/master
Remove warning: 'nk_to_upper' defined but not used
2017-01-24 22:28:13 +01:00
vurtun f5447a8406 Fixed typo _WIN64 instead of __WIN64
This is one of these highly embarassing typos I completly missed for a
long time.
2017-01-24 22:18:45 +01:00
Dmitry Hrabrov 7d52c0de67 Remove warning: 'nk_to_upper' defined but not used
There is function `NK_INTERN int nk_to_upper(int c)` in `UTIL` section. Implementation is almost the same to `NK_INTERN int nk_to_lower(int c)`. But only `nk_to_lower` used in Nuklear's code. To remove this warning we can: 
1) Comment i.e. remove `nk_to_upper` from code. But it can break someone's code, if he used it in module with `NK_IMPLEMENTATION` defined.
2) Hide it under define. Same. 
3) Just use it somewhere in code. 
I replaced two calls of `nk_to_lower` to `nk_to_upper`. It removes the warning, code works the same. The bad side - complication of the code. "Why `nk_to_upper` is used here, but not `nk_to_lower` as one line up?"
Maybe there exists better solution? Or just add the comment about this line to code?
2017-01-23 11:02:20 +03:00
Dmitry Hrabrov 36c60548a6 Remove unused panel warnings
When NDEBUG defined:
nuklear.h: In function 'nk_popup_begin':
nuklear.h:20753:22: warning: variable 'panel' set but not used [-Wunused-but-set-variable]
nuklear.h: In function 'nk_nonblock_begin':
nuklear.h:20850:22: warning: variable 'panel' set but not used [-Wunused-but-set-variable]
2017-01-22 16:00:28 +03:00
vurtun 3a7486cb35 Extended assert explanation #301 2016-12-20 20:45:36 +01:00
vurtun ca1c9b3275 Fixed text wrapping without seperator 2016-12-03 18:52:24 +01:00
vurtun ebe516c37b Text wrap now splits words not characters #292 2016-12-03 14:16:10 +01:00
vurtun a16877b5b8 Fixed minimized window closing bug #266 2016-11-22 18:16:26 +01:00
Micha Mettke 19fd6221f9 Merge pull request #286 from nsawa/fix__missing_init_of_popup_border
fix: popup border is not shown when using the default style settings
2016-11-20 11:24:27 +01:00
vurtun 6a374eabb1 Fixed abstract comobox closing behavior #282 2016-11-19 20:31:47 +01:00
vurtun c490e80f01 Fixed tooltip flickering #278 2016-11-19 19:43:44 +01:00
vurtun e7c06e027a fixed memory leak caused by repeated popup closing 2016-11-19 10:40:20 +01:00
vurtun e229856391 Fixed memory leak caused by popup panmel alloc 2016-11-18 18:30:18 +01:00
Naoyuki Sawa a7283af069 fix: popup border is not shown when using the default style settings 2016-11-16 11:32:33 +09:00
Kevin Harrison 40ea365aa9 Fix edit cursor movement and text overflow 2016-11-14 14:44:10 -05:00