Commit Graph

220 Commits

Author SHA1 Message Date
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
vurtun
c61d4f063c Fixed edit multiline widget width calculation 2016-11-14 19:21:49 +01:00
vurtun
d26ff34448 Fixed small edit widget box width calculation 2016-11-14 19:11:18 +01:00
vurtun
f2b9b9a586 Allow NK_API to be overwritten #281 2016-11-13 08:21:00 +01:00
Naoyuki Sawa
344f121468 fix: using nk_layout_row_begin() with NK_STATIC makes incorrect layout 2016-11-11 17:40:01 +09:00
vurtun
02fb019374 Fixed warnings and C++ error #279 2016-11-11 06:43:54 +01:00
vurtun
1acb7ba283 Added additional nk_tree version
Added another version of `nk_tree` that does not store internal state
to hold the tree state (minimized/maximized). Main advantages is
possibily less memory consumptions and more user control.
In addition a new set of button overloads were added to directly pass
in a button style struct which allows an easier way to have custom
button visuals for specific buttons.
2016-11-10 19:17:27 +01:00
vurtun
42efd8214f Added addition nk_group and new nk_list_view
Added additional `nk_group` version which uses an external scrollbar
offset instead of internally managing the memory. In addition
`nk_list_view` is introduced which allows drawing huge lists inside a
`nk_group`(#269).
2016-11-09 20:46:07 +01:00
Naoyuki Sawa
ebed2e6c0c fix: nk_value_color_hex() showed incorrect value. 2016-11-05 17:15:04 +09:00
Micha Mettke
18bacf0d8c Merge pull request #274 from nsawa/fix__nk_hsva_f
fix: nk_hsva_f() lacked processing for quadrant 3
2016-11-03 20:09:30 +01:00
Naoyuki Sawa
bb7ffc4c49 fix: nk_hsva_f() lacked processing for quadrant 3 2016-11-03 16:11:45 +09:00
Naoyuki Sawa
329dacd6ef fix: nk_value_color_byte() shows incorrect text 2016-11-03 14:39:50 +09:00
Naoyuki Sawa
bb2cd9a58c bugfix: nk_combo_separator showed incorrect item length and broken item text. 2016-11-01 10:58:56 +09:00
vurtun
b280370fc8 Fixed copy & paste error 2016-10-31 07:39:43 +01:00
vurtun
69b13a008d Fixed C++ errors 2016-10-30 15:31:04 +01:00
vurtun
7ed612ee9a Merge branch 'master' of https://github.com/vurtun/gui 2016-10-30 14:12:56 +01:00
vurtun
d8688c623f Fixed clipping rectangle bug 2016-10-30 14:12:30 +01:00
vurtun
bd3fd8300f Pulled panel memory managment into nuklear
I simplified a lot of API calls by pulling panel memory management
inside the library. All API calls which previously required a panel
as parameter are now handling their panel themself.
2016-10-29 23:28:47 +02:00
Micha Mettke
01eb4f88d8 Merge pull request #259 from ettoretorti/ettoretorti-patch-1
Correct NK_MEMCOPY optional define to NK_MEMCPY
2016-10-23 00:17:23 +02:00
vurtun
4020b1bab2 Changed border drawing for widgets
Previously every widget border was drawn by two overlapping rectangles
to limit the number of primitives required to be supported by any
potential backend. The biggest problem from using this approach
is drawing overhead and no real way to get widget transparency. So
I changed border drawing to use stroked rectangles instead of a
second filled rectangle drawing call.
2016-10-21 18:02:41 +02:00
vurtun
867b3359b9 Added functions to manually set edit widget focus
I added function `nk_edit_focus` to set the focus to the next edit
widget that will be called after calling.
2016-10-18 22:27:30 +02:00
Ettore Torti
69221cfd3d Correct NK_MEMCOPY optional define to NK_MEMCPY 2016-10-17 16:07:11 +01:00
Yaroslav Tsarko
26d77f88ff implemented ability to quick compare drawing command buffers
using memcmp and decide whether to draw a new frame or not:
  * added NK_ZERO_COMMAND_MEMORY macro
  * when NK_ZERO_COMMAND_MEMORY is defined, inside
    nk_command_buffer_push function there is an additional call
    to NK_MEMSET after allocating memory for new drawing command
2016-10-05 10:11:07 +03:00
vurtun
4e26fb0949 Fixed edit widget UTF-8 cursor drawing bug 2016-09-29 14:51:57 +02:00
vurtun
d370ef9bd1 Fixed edit widget UTF-8 text input 2016-09-28 19:58:37 +02:00
vurtun
3977145137 Fixed drawing bug inside edit box for UTF text 2016-09-28 18:28:25 +02:00
vurtun
3b89835533 Fixed font base85 decoding for trigraphs 2016-09-23 10:13:17 +02:00
vurtun
0fef9148fc Fixed color button size calculation 2016-09-20 18:28:20 +02:00
vurtun
ea47c24c28 Removed <stdio.h> fro NK_INCLUDE_STANDARD_VARARGS 2016-09-20 17:17:19 +02:00
vurtun
81d8d689cf Additional behavior fixes for nk_vsnprintf 2016-09-20 00:12:19 +02:00
vurtun
34ddd97c03 Removed test code 2016-09-19 19:12:02 +02:00
vurtun
85b7c7b7f3 Extend nk_strfmt to conform more to C standard 2016-09-19 18:47:34 +02:00
vurtun
7b71cbf03b Fixed NK_VSNPRINTF macro for vsnprintf 2016-09-19 10:46:19 +02:00
vurtun
1e2fadd46b Fixed small typo in standard library version check 2016-09-19 10:08:48 +02:00
vurtun
43a8e246be changed #if to #ifdef 2016-09-18 19:57:19 +02:00
vurtun
b0e2dba52c Fixed C89 error caused by missing vsnprintf
For more information please look inside the changelog. This is more of
an internal fix and hopefully does not break any existing code. I also
removed `nk_strfmt` from the API and made it internal only.
2016-09-18 19:49:52 +02:00
vurtun
5f3c1e241b Fixed popup close to deeper panel level
If you had any kind of popups like for example comboboxes inside a
deeper panel structure using nk_group, then `nk_xxx_close` would only
unblock input for the first level and not the whole panel stack. This is
now fixed and works correctly.
2016-09-16 10:44:45 +02:00
vurtun
00ab109855 Fixed C++ errors and internal selection padding 2016-09-16 10:09:26 +02:00