Commit Graph

1092 Commits

Author SHA1 Message Date
vurtun 7279f0f0cc Updated examples to new vertex layout API 2016-09-04 10:02:28 +02:00
vurtun 7f5d808809 Fixed CPP build
Looks like C++11 does not like conversion from pointer to int.
No problem just set type to `nk_size`.
2016-09-03 18:05:06 +02:00
vurtun fc832cef07 Fixed gaps in combobox under OpenGL
This is basically a hack to fill the gaps. I have absoultly no idea why
I get some of these gaps but hopefully it is fixed and does not come
back to hunt me in the future.
2016-09-03 12:55:28 +02:00
vurtun 1b9779ce51 Nuklear now allows custom vertex layouts
I removed the default vertex type and instead create an API to allow the
user to specify the vertex struct layout. Of course you are still
bound on what the library actual has on vertex data but the type and
sequence of the data is now configurable. This commit is quite
experiental and could introduce some bugs, but so far it look fine.
2016-09-02 15:33:49 +02:00
vurtun 210bc49b25 Removed unused variables 2016-08-31 20:04:28 +02:00
vurtun d9b2cf2035 Fixed #227 with API argument name mismatch 2016-08-31 19:38:32 +02:00
vurtun 4cc1778f9c Fixed C++ build errors 2016-08-31 19:29:18 +02:00
vurtun 550a2b03d3 Fixed some bug introduced by last commit and more
This commit fixed some bugs from the last commit as well as some general
changes and fixes of some old bugs. For overview of all changes please
look inside `CHANGELOG.md`.
2016-08-31 19:19:06 +02:00
vurtun 82e35927b4 Removed some internal complexity
This is a rather experiemental commit to remove some internal complexity
that build up over time handling panel padding and border. There still
could be some bugs but I tried my best to keep everything working.
2016-08-30 21:54:10 +02:00
vurtun ad821dc808 Added additional height parameter to combo box
Added a max height parameter to very retain mode combo box to allow
a fixed height.
2016-08-29 19:40:27 +02:00
vurtun 24f7096acc Added popup mouse scrolling and fix popup drawing
Previously it was only possible to scroll windows and groups by mouse.
No it is possible to scroll popups, as well as nonblocking popups like
menus, contextuals and comboboxes. In addition I fixed a drawing bug
in dynamically growing panels.
2016-08-29 19:20:53 +02:00
vurtun 8e4d8ee741 Added window name string representation
To account for hash collisions which can be quite nasty I added
the string representation of the window name for additional
assurance. I also added an assert to check and alert if two windows
have the same name.
2016-08-26 20:31:33 +02:00
Micha Mettke abac1878eb Merge pull request #222 from KalenAnson/master
Do not insert a backward delete
2016-08-26 20:02:38 +02:00
vurtun 727b912390 Update canvas example with background color arg
`nk_canvas_begin` now takes a background color directly instead of
requiring the user of the API to clear the window background with
another draw call.
2016-08-26 19:48:04 +02:00
vurtun d4625dc9c1 Added stacks for temporary style/UI changes
It is now possible to temporarily push some style values like color,
style items, font, ... into a stack modify the value and as soon as
you are done just pop the changes. Main benefit is less boilerplate
code to manually save and restore configuration properties.
2016-08-26 19:46:06 +02:00
Kalen Hall f614b5dc1a Check for incoming backward delete (unicode 127) and do not insert into text box, just process as a text event 2016-08-26 11:08:12 -04:00
Micha Mettke 7577513efc Merge pull request #217 from kybin/master
make all examples
2016-08-25 14:15:45 +02:00
vurtun e8936c8111 Merge branch 'mmozeiko-master' 2016-08-25 08:12:28 +02:00
Martins Mozeiko cda38a853c Fixed issues with GDI+ demo - font handling and typo for VK_END handling. 2016-08-24 19:16:34 -07:00
vurtun 114757ffa6 Hopefully fixed iOS key up/down issue #215
SDL iOs implementation provides key press and release in
one frame and while nuklear previously was keeping track
of transistions it did not check it. It hopefully should now be
possible to correctly interpret up and down key in the same frame.
2016-08-24 20:37:26 +02:00
vurtun e69aee6922 Added additional nk_edit flag
Added flag `NK_EDIT_GOTO_END_ON_ACTIVATE` flag to text fields which
cursor jump to the end of the text field when activated.
2016-08-24 20:22:38 +02:00
vurtun 63c4c40203 Merge branch 'master' of https://github.com/vurtun/gui 2016-08-24 19:01:21 +02:00
vurtun 9f60ef2a3b Fixed #218 with invalid assert and condition check 2016-08-24 16:01:43 +02:00
kim yongbin 285e43c787 make all examples 2016-08-24 00:34:13 +09:00
Micha Mettke d9b34fe219 Merge pull request #216 from kybin/master
add missing CLFW_PRESS check for GLFW_KEY_RIGHT_CONTROL
2016-08-23 17:30:39 +02:00
kim yongbin b54bc88e47 add missing CLFW_PRESS check for GLFW_KEY_RIGHT_CONTROL 2016-08-23 23:00:40 +09:00
vurtun ef835f7afc Fixed some C++ errors and styling in windows demos 2016-08-17 08:00:38 +02: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