Commit Graph

1067 Commits

Author SHA1 Message Date
kim yongbin
285e43c787 make all examples 2016-08-24 00:34:13 +09:00
kim yongbin
b54bc88e47 add missing CLFW_PRESS check for GLFW_KEY_RIGHT_CONTROL 2016-08-23 23:00:40 +09:00
vurtun
9d184a8b91 Fixed ROM-Flag for deeper level of popup parents
No you can have non/block- popups inside nested groups while the parent
groups do not receive any more input which was a bug.
2016-08-16 19:33:33 +02:00
vurtun
9d14e8e3ae Split CHANGELOG into own file
Since the CHANGELOG in `nuklear.h` became bigger and bigger I decided to
split it into it's own file. Probably have to think about a layout.
2016-08-16 17:40:57 +02:00
vurtun
8bf255030a Keep edit field active after enter commit
Edit widget width `NK_EDIT_SIG_ENTER` flag now keep their active
state after enter was pressed. Main reason is to be able to keep
typing after commiting.
2016-08-15 15:07:11 +02:00
vurtun
ce234fc7a7 Removed redundant code 2016-08-15 11:50:40 +02:00
vurtun
01c088e7d8 Fixed negative numbers in nk_strtoi 2016-08-15 11:24:00 +02:00
vurtun
2dab85fde1 Enhanced the canvas example a little bit
Removed some global varibles and made the canvas a little bit easier
to use and embed into code.
2016-08-15 10:35:42 +02:00
vurtun
3771eb1dab Changed NK_WINDOW_BACKGROUND behavior
Background windows now get only selected by hovering if no other window
is above it and not on clicks.
2016-08-15 10:34:27 +02:00
vurtun
338eba3d57 Fixed #211 font baking bug with multiple ranges 2016-08-14 18:46:22 +02:00
vurtun
cae6005015 Removed emscript demo since not up to date
Taking in an extern demo is almost always a bad idea since I will be
the one to keep to date and I am not always able to do so. Emscript
was the last time I tried. For now on if anyone has a neat demo
please keep it in your own repository and I will create a link to it.
2016-08-12 20:23:55 +02:00
vurtun
1cc7697d58 Removed unused variables 2016-08-12 20:17:04 +02:00
vurtun
c7c355e55a Added function to check if window is hidden
`nk_window_is_closed` previously checked if the window is hidden
instead of checking if it is closed. This behavior is now fixed and I
added an additional function `nk_window_is_hidden` to check if a
window is currently hidden.
2016-08-12 20:14:42 +02:00
vurtun
02718210e6 Added additional property version for double
Nuklear now has three different property versions for int, float and
added by this commit a double version. Internally an additional change
happend. Now the type of the property is actually taken into account
and floating pointer errors due to casting are less of an issue.
2016-08-12 12:08:13 +02:00
vurtun
427744e57c Added define to replace float to string conversion
Since floating point to and from string conversion is a total pain
and really complex it is really hard to provide a realtive simple
non-standard library solution. But to solve both problems I now added
a way to overwrite the library intern float to string conversion
implementation if you really need more precision.
2016-08-09 21:30:36 +02:00
vurtun
f675cea305 Added define to overwrite nk_strtod
Since nuklear internal string to number conversion is quite imprecise,
and a correct solution is way to complex (I dare you to look at the
implementation of strtod, dtoa, ...) I now provide a new define to
overwrite the library function with either your own or the standard
libray implementation.
2016-08-09 18:33:31 +02:00
vurtun
e7eb366332 Fixed compiling without NK_INCLUDE_FIXED_TYPE 2016-08-09 07:43:45 +02:00
vurtun
a384c6ed80 Fixed possible floating pointer error in nk_widget
Under certain circumstances it is possible that because of floating
point error `nk_widget` will mark a widget as read only if used in
combination with `nk_layout_row`. The fix is rather simple in this
case since the additional floating point precision is not really needed
it is possible to just cast to int and remove the problem all togther.
2016-08-08 20:48:50 +02:00
vurtun
69d8db0f2b Differentiate between closing and hiding a window
There is now a difference between hiding a window with
`nk_window_show` and closing a window by clicking the close button in
the window header or calling `nk_window_close`. Only in the case of
activly closing a window will be removed at the end of the frame
besides getting removed if not updated inside the frame.
2016-08-08 17:01:48 +02:00
vurtun
7635094d27 Added '\0' terminated nk_edit_string version
To support both string formats with string combined with length as
well as zero terminated strings I added a zero terminated string
version to `nk_edit_xxxx` with `nk_edit_string_zero_terminated`.
2016-08-08 12:42:10 +02:00
vurtun
2e66a94de9 Fixed minor scrollbar and panel padding bug
Fixed scrollbar auto hiding behavior to also work correctly if
the window is not hovered or manipulated in any way.
In addition I fixed a small panel padding bug in `nk_layout_widget`
for all panels outside windows which require a test on
`layout->flags` instead of `window->flags`.
2016-08-08 12:08:51 +02:00
vurtun
a0870bd307 Fixed bug in layout API calculating wrong width
The dynamic immediate mode layout API with `nk_layout_row_begin`,
`nk_layout_row_push` and `nk_layout_row_end` caused an infinite
scrollbar bug by wrongfully calculating the required widget sizes.
This bug is now fixed and everything is correctly calculated.
2016-08-07 21:53:20 +02:00
vurtun
4b910e0f31 Update example version numbers 2016-08-07 21:26:53 +02:00
vurtun
f50f83698c Fixed drawing bug inside combobox popup 2016-08-07 21:26:10 +02:00
vurtun
94ca7accdf Version 1.05 split varargs include into own define
Previously I packed standard library variable arguments as well as
file operation into one define `NK_INCLUDE_STANDARD_IO`. This caused
some problems and I split the define into two. So if you want the old
behavior you need to define `NK_INCLUDE_STANDARD_IO` as well as
`NK_INCLUDE_STANDARD_VARARGS`. If you only want file operations but
not variable arguments only define `NK_INCLUDE_STANDARD_IO` and
if you only want varargs but not file operations please only define
`NK_INCLUDE_STANDARD_VARARGS`.
2016-08-06 17:44:00 +02:00
vurtun
f288188a72 Changed overlooked memset calls to NK_MEMSET 2016-08-06 14:36:31 +02:00
vurtun
204a663de7 Fixed fast window scaling behavior
If you move the cursor to fast while scaling a window there is a
chance the mouse will miss the scaler and the scaling operation will
halt. Dragging in itself is quite hard but I implemented the hack I
use for property, window moving and slider for the window scaler and
scaling hopefully now works correctly.
2016-08-04 21:09:31 +02:00
vurtun
2b1c2ca540 Fixed window scaling, movement bug
This is quite an old bug and a result of being nearly stateless.
If you move/scale a window and another window is behind it the other
window will be acitvated and the move/scale operation will be stopped.
To fix this I now require no mouse down for activating by hovering.
I hope this does not cause any problems and fixes the problem for good.
2016-08-04 16:31:44 +02:00
vurtun
100480c6c7 Fixed swapping out fonts
I had a long standing bug inside nuklear which prevents you from
swapping out a font while the code is being build. This bug is now
fixed but the fix requires _ALL_ `nk_user_font` data structures
provided by `nk_style_set_font` to be persistent.
2016-08-04 14:18:29 +02:00
vurtun
69df3f5369 Fixed #194 example/extended.c compile error 2016-08-04 08:59:17 +02:00
vurtun
7f4e5eb76e Fixed 'NK_WINDOW_BACKGROUND' behavior 2016-08-03 20:21:31 +02:00
vurtun
b251f91107 Fixed multiple crashes in font handling 2016-08-03 16:22:13 +02:00
vurtun
8d5c479db2 Release version 1.04 changes in changelog 2016-08-03 12:01:33 +02:00
vurtun
84b1bbf069 Fixed NK_RGB color picker widget
Removed invalid assert macro which wrongfully triggers if you call
`nk_color_picker` with parameter `NK_RGB`.
2016-08-03 09:50:56 +02:00
vurtun
bb61df524d Removed /WX flags from gdi/gdip build bat files 2016-08-02 21:39:12 +02:00
vurtun
fd5239fa82 Fixed copy and paste error in gdi/gdip demos 2016-08-02 21:22:15 +02:00
vurtun
c87a55cf56 Version 1.04 with seperated window name and title
Added `nk_begin_titled` for seperated window name and title or cases
you need to keep persistent state between frames while changing
the window title.
2016-08-02 10:48:32 +02:00
vurtun
c957b49d04 Moved helper macros inside header guard
A previous push request added some macros into the header file and
I missed that it was outside the header include guard. This should
now be fixed and not cause problem if included multiple times in
different location.
2016-08-01 21:54:41 +02:00
vurtun
c84b2f9a96 Fixed notebook tab group with same name
I forgot to provide a new name to the notebook group so if you
scroll the other group with the same name it will not work.
2016-08-01 13:06:23 +02:00
vurtun
c4315eaf5b Added flags indicate if an event was used in demo
Demos for x11 and sdl have been update so that `nk_xxx_handle_event'
return true (1) if the given event was usefull and processed by
nuklear and false (1) if not.
2016-08-01 12:51:43 +02:00
vurtun
648aca3a6a Added notebook tabs example to overview.c
Since it was requested I added a small snippet showing how to create
notebook tabs (header with buttons, selecting content). The added
demo is basically just a combination of already existing widgets +
some small styling changes and can be extended to easily support
case with more tabs then space in the header part. I will have
to think about if it is possible to create an API for this without
taking away the simplicity of it.
2016-07-31 20:37:24 +02:00
vurtun
3011ef451f Added clipboard as default flag to edit fields
Edit flags are now a default flag for edit field and editors.
2016-07-31 20:35:32 +02:00
vurtun
831a9c32da Update examples to version 1.03 2016-07-29 23:26:44 +02:00
vurtun
ebfeeea7e1 Version 1.03 with auto hiding window scrollbars
Window scrollbar will if enabled by window flag hide if no user
interaction happens for a set time duration.
In addition the internal window/table data structs are now located
inside the header part of nuklear to remove the need to allocate a
pool and therefore simplify memory management.
2016-07-29 12:36:51 +02:00
Micha Mettke
11c380219e Merge pull request #185 from timothyqiu/doc_fixes
Fixes typos in comments
2016-07-28 09:57:07 +02:00
Timothy Qiu
ff00fc00f6 Fixes typos in comments 2016-07-27 09:54:56 +08:00
vurtun
fe1f1530f4 Fixed hole in combobox and window border drawing
Hopefully I finally fixed the hole inside combobox popup which only
occur if you set the window border size greater one. In addition
I fixed some subpixel drawing artifacts that come up if you use
antialising in combination with vertex buffer output.
2016-07-25 16:54:59 +02:00
vurtun
9637af3681 Fixed window border and popup border drawing 2016-07-25 11:58:01 +02:00
vurtun
980889e6f9 Fixed color picker crosshair drawing
The crosshair inside the color picker had some some wrong pixel
measurements. This is now fixed and should look correct.
2016-07-25 09:42:20 +02:00
vurtun
c5614d9098 Release 1.01 changes in changelog in nuklear.h
Breaking changes to the button API, font atlas and added software
cursor to library.
2016-07-16 01:33:37 +02:00