Commit Graph

220 Commits

Author SHA1 Message Date
vurtun
8ebd0afe79 Fixed window position/size modification
Fixed windows ignoring changes to its position, size or both if a
group layout is used.
2016-04-25 14:11:35 +02:00
vurtun
2a230e2bd6 Removed shadows variable warning 2016-04-25 10:13:09 +02:00
Doug Thayer
72b362325d Fix issue with adding multiple fonts
The total range count grabbed from nk_range_count was being used
to get the glyph count, which resulted in a buffer over-read.
2016-04-24 14:05:34 -07:00
vurtun
412f65fa65 Fix #108 pushing wrong texture in empty draw_list
Fixed a small copy & paste error which pushes the wrong texture
into an empty draw list. In normal cases this never occurs but is
still a big if used independent of libraries use cases.
2016-04-23 16:29:58 +02:00
vurtun
5da8216f71 Fixed property text input
Inserting text into a property would cause an assert because
I forgot to set the upper bounds of the text edit inside the property.
2016-04-23 12:28:45 +02:00
vurtun
bdbc8f9c26 Removed private underscore of nk_tree__push #106
`nk_tree__push` was not supposed to be seen as private but more like
the more extended way of handling duplicate tree elements. But I used
double underscore which is the general indicator for private. I renamed
it know to nk_tree_push_id, to hopefully make it clearer.
2016-04-23 10:34:50 +02:00
vurtun
3929ec8dee Added some additional documentation 2016-04-21 17:35:52 +02:00
vurtun
bc8db2e3f3 Fixed #97 with text input at end of edit field
This commit fixes a bug that occurs if you move the cursor inside
text and then back to the end of the text and insert a character.
Caused was the bug by an incorrect check if the cursor is at the
end of the string.
2016-04-21 12:39:07 +02:00
vurtun
7c9659f3b8 Fixed #99 forgot to set clipboard callbacks
Previously if you use `nk_edit_string` and use flag
`NK_EDIT_CLIPBOARD`, callbacks were not passed. I only tested it with
`nk_edit_buffer` and set the callbacks directly. This wrong behavior
is now fixed and should work copy & paste should behave correctly.
2016-04-21 11:04:18 +02:00
vurtun
7ccd95f2f1 Reverted qsort back to own implementation
Forgot the remove some test code for the last commit.
2016-04-20 18:36:51 +02:00
vurtun
1d7f0244f9 Revert float '=' cond and oversample default font
I previously used a conditional style so I don't have to compare
floats directly with eachother because of warning. This caused some
bugs and I now reverted back all conditions back to normal.
In addition I oversampled the default font to make it look better.
2016-04-20 18:28:04 +02:00
vurtun
18b93fcc8a Fixed #90 cppcheck warning and errors
Thanks to @codemeow I fixed some bugs and warnings found with
cppcheck. NOTE: it seems like all static analyzer fail to
detect the assert macro or hate combining assert ans if checks.
2016-04-20 10:31:20 +02:00
vurtun
4d02cf9c80 Removed unused variable 2016-04-19 19:46:13 +02:00
Emery Hemingway
92f5257e92 correct type definitions without NK_INCLUDE_FIXED_TYPES 2016-04-19 15:28:44 +02:00
Bruce Mitchener
da46d536f9 Fix some typos. 2016-04-19 15:23:33 +07:00
vurtun
9b2822c06e Fixed #63 error and wrong header dragging calc 2016-04-19 00:35:52 +02:00
Angus Holder
a6e980df6e Clearing up compiler warnings
Some minor issues: an unused variable, fixed a comparison of int against
float, and a pragma warning (pop) that didn't have a matching pragma
warning (push). Potentially more serious was a possible buffer overrun,
where a pointer was being tested against a null terminator, instead of
the char it points to.
2016-04-18 20:29:34 +01:00
Angus Holder
12f3c8406d Fixes for C++ compatibility, corrected an assert call
There were a few casts from void * missing causing problems when
compiling as C++, also the assert function from <assert.h> was being
used instead of NK_ASSERT(...) in one place.
2016-04-18 16:08:43 +01:00
vurtun
d7a9f14c1c Fixed some small bugs and added calc example
Fixed window movement for windows without header and some small
wrong calculation inside the panel layout code. In addition I
added another example implementing a simple calculator.
2016-04-15 20:13:50 +02:00
vurtun
b2c87ed7c0 Release Version 1.0
This is the first release version of nuklear (previously: zahnrad).
As for those who no the old version will notice: a lot has changed.

Most obvious should be the two biggest changes. First the name change
because I got critique that the name is hard to comprehend and
remember (understandable for non-germans) and the second is the
transistion from four files (zahnrad.h, zahnrad.c, stb_truetype
and stb_rect_pack) to one single header library file nuklear.h.
I am not 100% convinced that using a single header library is the
right choice here but so far I haven't encountered any problems.

Noticable should be as well that nuklear now directly embeds three
stb libraries: stb_truetype, stb_rect_pack and stb_textedit. Like
in previous versions the first two are optional and the library
can be compiled without. stb_textedit on the other hand powers
the text edit implementation for single as well as multiline
text manipulation. The text edit implementation is still relative
new and untested so you can expect some bugs I have not found yet.

In the demo department a lot changed as well. All platform demos
now don't compile one big demo but instead contain a simple
demo and small abstraction layer over the platform. Main benefit is
better understandablity improved ease of use. The old demo
is now split up and transfered into the example folder while each part
is self contained and compileable. (All examples use glfw I don't now
if this is the best platform but it is at least the simplest.
I also removed the apple demo because I don't have an apple system
and cannot make sure the new version runs with the old version.

Finally a lot of small bugs have been fixed as well as bugs found by
clang analyzer and coverity.
2016-04-14 16:26:15 +02:00