Commit Graph

241 Commits

Author SHA1 Message Date
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
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