Commit Graph
1523 Commits
Author SHA1 Message Date
Ricardo Antonio Tejada c6bfe1c157 Finally! I fixed that bug that I had. sf::Mouse::setPosition was setting the position of the cursor to desktop coordinates not window coordinates. 2017-03-01 17:17:43 -05:00
Ricardo Antonio Tejada 63e98d90bd Almost ready for merge. Need to fix bug with mouse movement. Need to implement clipboard support. Lastly need to write ReadMe on instructions for building. 2017-02-28 19:32:55 -05:00
vurtun 443a058dd8 Merge branch 'ClassJG-master' 2017-02-25 22:54:48 +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
vurtun e7d02b4a45 Updated Readme 2017-02-24 19:18:27 +01:00
Ricardo Antonio Tejada 5007519ae7 Dumped the pure SFML folder. Got it working enough to realize that it just ran too slow to continue wasting time on it. SFML creates a OpenGL context anyway so users can drop in the nk_sfml_gl2.h and not need anything else. I'll have to add this in the readme. Tried to make my code as similar to other demos for sake of consistency. 2017-02-23 02:02:59 -05:00
vurtun 4ed15f5a35 Fixed Readme layouting 2017-02-21 19:06:37 +01:00
vurtun 82b8ac0445 Merge branch 'embox-master' 2017-02-21 19:00:32 +01:00
vurtun eaf104db3f Merge branch 'master' of https://github.com/embox/nuklear into embox-master 2017-02-21 18:59:31 +01:00
Micha Mettke 5f78107fc5 Added nim language bindings to Readme 2017-02-20 14:32:12 +01:00
Dmitry Hrabrov 67aaa11f5d Return global clipping back 2017-02-18 15:24:45 +03:00
Ricardo Antonio Tejada 73b0b945b4 Added OpenGL3 for SFML and also working on "pure" SFML renderer. 2017-02-17 17:54:24 -05: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
Ricardo Antonio Tejada 2babe51576 Fixed the clipping glitch (bug that caused the window borders and backgrounds to not be rendered).
Fixed text input bug that could cause the program to crash.
2017-02-13 01:59:32 -05:00
Micha Mettke cd0969c3a0 Merge pull request #341 from mmozeiko/master
GDI+ simplified image loading, added error checking and image freeing
2017-02-11 17:51:24 +01:00
Martins Mozeiko aa3ffd6917 GDI+ simplified image loading, added error checking and image freeing 2017-02-10 00:41:31 -08:00
Ricardo Antonio Tejada 2d1ea95600 Adding SFML backends for Nuklear. Working on porting over the OpenGL 2 renderer from the GLFW and SDL examples.
Still some rendering bugs I would like some help on.
2017-02-09 20:54:28 -05:00
Dmitry Hrabrov 7483f7ce38 Fix panel clipping
`layout->bounds` cannot be used (loc 16615) since we modify it up here:
`layout->bounds.x += panel_padding.x;`  (16471)
`layout->bounds.w -= 2*panel_padding.x;` (16472)
Because of it there was no ability to `nk_draw_image` attached to window's edge. There alway was empty lines of right and left.

This code breaks the other's code. Popups, for example. My paddings are 10px. To show popup at (20,20) without this patch I must use `nk_rect(10, 20, ...`. With this patch I must use `nk_rect(20, 20, ...`, not depending on paddings. I think (20,20) is a correct constant for (20,20) coordinate.
2017-02-09 17:13:52 +03:00
Anton Bondarev 6fa8424d6e Make NK_API 'static inline' for NK_PRIVATE version 2017-02-06 16:43:33 +03:00
Micha Mettke d536d4e89a Merge pull request #337 from DeXP/master
GDI+ split rendering GUI and clear surface
2017-02-05 10:39:28 +01:00
Dmitry Hrabrov 35e8558be4 GDI+ split rendering GUI and clear surface
For example, I draw something via GDI+. Now I can call `nk_gdip_render_gui(AA)` and it will not erase my drawings, just will draw on top. 
Previos API was not changed.
2017-02-04 18:24:49 +03:00
Micha Mettke 2df399ecda Merge pull request #336 from DeXP/master
GDI+ text transparent background fix
2017-02-04 16:12:00 +01:00
Dmitry Hrabrov 4442697ee0 GDI+ set text color only once 2017-02-04 12:53:19 +03:00
Dmitry Hrabrov 5d98939a2d GDI+ text transparent background fix
There is no need do draw filled rectangle behind of any text
2017-02-04 12:52:02 +03:00
Micha Mettke 020acd4159 Merge pull request #335 from DeXP/master
Remove warning "unsigned only in ISO C90"
2017-02-04 10:46:57 +01: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
vurtun 6b27c20231 Fixed #331 with graceful x11 window closing 2017-01-23 19:33:58 +01:00
Dmitry Hrabrov 16c2dddae4 Fix typo 2017-01-23 11:19:27 +03: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
Micha Mettke 2e9c4ee0ab Merge pull request #329 from DeXP/master
Remove unused panel warnings
2017-01-22 15:37:52 +01:00
DeXP 4a3573b032 Merge branch 'master' of git://github.com/vurtun/nuklear 2017-01-22 16:09:12 +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
Micha Mettke 431e67597c Merge pull request #327 from DeXP/master
GDI+: loading TTF font from file
2017-01-21 19:55:16 +01:00
vurtun 6f8fe8d05b Fixed input capture from hidden or closed windows
Previously if you would call 'nk_window_show' on a currently hot window
the window will keep on taking all input. This wrong behavior is now
fixed.
2017-01-21 19:22:12 +01:00
vurtun bd44f4fa3a Removed temporary file 2017-01-21 18:55:45 +01:00
vurtun 8892727361 Fixed slider behavior and drawing
Slider is still comming back to haunt me. They never worked like I
wanted them to, but hopefully this is now finally fixed. Previously if
you declared a slider not beginning with 0 it would break and not work.
This behavior is now fixed.
2017-01-21 18:50:31 +01:00
Dmitry Hrabrov 8033c400b4 Added loading TTF font from file
Also font API rename to be the same with images.
2017-01-20 15:09:27 +03:00
Micha Mettke b544d616e3 Merge pull request #324 from DeXP/master
Define IStream interface
2017-01-19 20:35:03 +01:00
Dmitry Hrabrov 4d957de4a1 Define IStream interface 2017-01-19 22:14:56 +03:00
vurtun 5011a36529 Updated CHANGELOG format and versioning 2017-01-15 21:13:38 +01:00
vurtun 34d0fcd43d Merged #198 with bottom-left corner scaler 2017-01-14 15:22:22 +01:00
vurtun be7ac9b903 Updated Makefile as of #256 2017-01-14 09:46:13 +01:00
vurtun aa1f516fa3 Added row template layout example to demo/overview 2017-01-12 20:49:52 +01:00
vurtun 13c785d68b Fixed #322 C89 compiler error 2017-01-12 07:44:35 +01:00
vurtun f2ea71aaab Merge branch 'master' of https://github.com/vurtun/gui 2017-01-11 23:29:47 +01:00