Commit Graph

1092 Commits

Author SHA1 Message Date
mogud 1b4ea11954 fix macro nk_tree_image_push_id: params error 2016-06-23 14:12:11 +08:00
vurtun 76ba0b2374 Fixed alignment bug after buffer reallocation
Previously if a dynamic back buffer is full and reallocated then the
current allocation alignment will be alignet at the direct memory
address instead of memory address minus size. This is now fixed and
alignment should work correctly.
2016-06-20 20:01:24 +02:00
Joseph Werle cc57b77565 make clib friendly 2016-06-18 14:12:58 -04:00
Yaroslav Tsarko 3ac1ac5991 some very useful macros (for common MATH and ALIGNMENT operations)
are moved to library interface part in order to use them in client
code (especially in creating nuklear backends)
2016-06-17 12:41:17 +03:00
vurtun 920374bb44 Added scrollbar shortcuts to demos 2016-06-16 20:53:30 +02:00
vurtun c9f07101f3 Removed shadow variable 2016-06-16 20:48:59 +02:00
vurtun 848d35ea68 Fixed group inside group scrolling
This commit deactivates scrolling for each parent group and window
of a panel to only allow exactly *one* active scrollbar.
2016-06-16 20:25:26 +02:00
vurtun 30087c41ef Fixed missing NULL check
Forgot to check if `nk_input` is NULL
2016-06-16 20:07:18 +02:00
vurtun c39afae44b Merge branch 'master' of https://github.com/vurtun/nuklear 2016-06-16 16:35:59 +02:00
vurtun 06ec76c3ff Added group scrollbar scroll wheel and shortcuts
It is now possible to use mouse scrolling as well as shortcuts for
windows as well as groups. But there is still some unwanted behavior
if you scroll the window and while scrolling hover over a group then
the group will be scrolled and not the window. I will look into fixing
it.
2016-06-16 16:10:11 +02:00
vurtun 758d9c405a Fixed copy & paste bug in scrollbar implementation
It should now be possible to just click on one of the empty spaces
inside scrollbars to jump one window frame down or up.
2016-06-15 21:34:49 +02:00
vurtun b020c332d0 Added general scrollbar shortcuts
This commit extends nuklears scrollbar with some basic shortcuts.
Included are page up/down as well as jump to beginning and
end of window. The last scrollbar change is page down/up by mouse
click in empty scrollbar space.
2016-06-15 17:39:14 +02:00
vurtun e7307ae2fd Fixed text clipping bug inside draw list
Text was previously wrongfully software clipped if text was only
partially visible. The wrong behavior is now fixed and text should
be clipped only if the text is completely outside the clipping rect.
2016-06-15 14:10:32 +02:00
vurtun 4d8738282a Fixed #165 C++11 specific error
Surprising turn out, the C++ standard comitee consists of a bunch of
retards invalidating completely fine code and requesting super
idiotic work arounds for their new versions. I have no fucking idea
why these spaces are required and honestly I don't even want to know.
Whatever the reason it should now compile fine with C++11 until the^
next C++ version will probably invalidate it again. To a better
future I can't wait.
2016-06-14 22:45:58 +02:00
Chris Willcocks f53e2d51d8 path fix 2016-06-14 16:18:38 +01:00
vurtun 110a9a77fb Made reading out moved/scaled group bounds easier
Previously if you used movable or scalable groups you had to add
the group border width to the panel to access the updated position
or size. Nuklear now takes control of the process and the new
position/size can be read after `nk_group_end` from `nk_panel`
directly.
2016-06-14 12:35:03 +02:00
vurtun c152abb78c Changed toggle to be font height dependent
Extended toggle style and changed toggle (checkbox + radio button) to
depend on the font height instead of row height. The main reason is
that it is easier to configure the cursor inside.
2016-06-14 12:22:05 +02:00
vurtun 8ed50e08d4 Fixed configuration of group border color
This commit adds a previously missing `group` flag to each group panel
and therefore allows to check for groups inside `nk_panel_end` and
draw the correct border color.
2016-06-14 09:49:09 +02:00
vurtun ea4ac755de Fixed group/node movement and scaling
Fixed a small bug introduced by the last commit which prevent
groups from being moved. In addition I fixed an old scaling bug for
groups. It should now be possible to have movable and scalable
groups.
2016-06-13 20:02:44 +02:00
Chris Willcocks 5d440b565b Emscripten support with glfw3 (and shaders) with changes to nuklear_glfw_gl3.h - demo at www.cwkx.com/nuklear/ 2016-06-13 16:38:32 +01:00
vurtun a299b46b6d Updated Readme 2016-06-12 16:14:24 +02:00
vurtun d57fce9b85 Added missing label text color 2016-06-12 15:48:47 +02:00
vurtun 2e7dd3dc04 Added GWEN style skinning example #155
This commit adds a GWEN UI style skinning example. It is
certainly not perfect right now (especially windows suck) but
it is probably useful for a general overview. One thing that is
pretty clear for me now is that I need a way to read in a style from
file or memory since manually setting up properties, colors
and images is quite a pain.
2016-06-12 15:28:38 +02:00
vurtun 4dc22cd99b Extended style/config and Fixed horizontal scroll
Fixed window y-padding and added scrollbar cursor padding and extended
scrollbar styling properties to separate between cursor and scrollbar.
In addition I added a property to control tab indentation. Finally fixed
clipped horizontal scrollbar for group.
2016-06-12 15:28:22 +02:00
vurtun be2e35e3c1 Fixed clipped group scrollbar behavior Ro.2
While the last commit fixed some issues it still had a bug which
caused wrong scrollbar target size calculation. So this commit
hopefully fixes the problem.
2016-06-11 21:52:06 +02:00
vurtun c4c3ce226f Fixed clipped group scrollbar behavior
Previously if a group had a scrollbar and is not completly visible
inside the window then the its scrollbar would use the clipped
height instead of its actual height as scroll reference. This should
now be fixed and work correctly.

In addition I split the tab/node button style into two one for the
minimized and one for the maximized state change.
2016-06-11 19:05:16 +02:00
vurtun a4dce2565e Removed old commented out code 2016-06-11 11:13:52 +02:00
vurtun f7575a9962 Merge branch 'ands-master' 2016-06-11 11:12:46 +02:00
vurtun 07cffde659 Merge branch 'master' of https://github.com/ands/nuklear into ands-master 2016-06-11 11:11:44 +02:00
vurtun 3eafc226ef Fixed scaler drawing and window motion bug
Previously window borders were wrongfully drawn with already updated
size onto a window drawn with old size. This is now fixed and scaling
is a delayed by one frame.

In addition I hopefully finally fixed a window movement bug which
occurs if you drag one window header over another one really fast.
This would cause the previously not selected window to be wrongfully
selected and moved.
2016-06-10 22:43:45 +02:00
ands 6e41aa6ce3 Fixed a NULL dereferencing bug. 2016-06-10 21:34:21 +02:00
ands a0f75bd5d9 don't depend on the title in nk_tree_push_hashed if a hash is already specified to allow editing it from inside the node/tab. 2016-06-10 19:33:47 +02:00
vurtun 1ac8021979 Fixed mouse dragging behavior
Fixed a bug inside the library and demos causing wrong dragging
behavior for `nk_property_xxx`.
2016-06-06 11:36:39 +02:00
vurtun 66c5c9fc64 Added optional font atlas temporary allocator
This commit adds another init function to font atlas which allows to
specify one allocator for temporary and one for permanent allocation.
In general this makes it managing memory a little bit more fine
grained. This is not a breaking change and the old API still works
without problems.
2016-06-06 10:11:08 +02:00
vurtun c962163773 Fixed bug inside textedit redo stack 2016-06-04 16:16:10 +02:00
vurtun 66c2ac72d6 Fixed #158 key press typo in GLFW backends 2016-06-01 13:35:01 +02:00
vurtun 3f935941f8 Added additional comments to asserts 2016-06-01 13:34:26 +02:00
vurtun ba1ff9c23c Added canvas example
Added another example to show how to use Nuklear to only draw stuff
to the screen instead of using it for UI (or both).
2016-05-27 13:27:29 +02:00
vurtun 3f7f145819 Merge branch 'ytsarko-master' 2016-05-27 11:33:10 +02:00
vurtun 792a3af51e Fixed property value drawing bug under xlib
For some reason `xlib` still draws text even if the scissor rect has
a width or height of `0`. I don't know if this is a bug on my end or
on xlib but whatever the source it is now fixed.
2016-05-27 11:29:42 +02:00
Yaroslav Tsarko de91bd6e03 fixed compilation when 'NK_INCLUDE_VERTEX_BUFFER_OUTPUT' macro isn`t defined
but 'NK_INCLUDE_FONT_BAKING' is
2016-05-27 10:12:59 +03:00
Yaroslav Tsarko cc97f7bf4b fixed 'unsigned short' overflow when
drawing widget text with font size > widget height
2016-05-27 09:48:01 +03:00
vurtun 9c455006c7 Added icon tree nodes/tabs 2016-05-25 18:21:51 +02:00
vurtun e6063b79aa Added chart line/column dependend coloring API
It's now possible to define a specific color for each line or
column entry inside a chart. This purely extends the API and all
previous implementation still work.
2016-05-25 10:58:00 +02:00
vurtun 8a76dd8f8b Merge branch 'spaghetti--master' 2016-05-24 18:09:00 +02:00
vurtun 750b83601d Merge branch 'master' of https://github.com/spaghetti-/nuklear into spaghetti--master 2016-05-24 18:08:13 +02:00
vurtun 945853e62c Added selectable label + images #151 (breaking)
This is a breaking change to hopefully noone. I removed all drawing
callbacks inside `nk_style` structs. The reason is that they are
quite ugly and a lot of work to maintain in the future. In addition
I added `nk_selectable_image_text`, `nk_selectable_image_label`,
`nk_select_image_text` and `nk_select_image_label` for combined
text and image selectables.
2016-05-24 17:34:28 +02:00
vurtun 25cfeb98af Added property OS cursor hiding for mouse grabbing 2016-05-23 14:56:22 +02:00
vurtun 8e3a5c74d3 Fixed #148 missing function definitions
Added missing function definitions for `nk_color_hsv_b`,
`nk_color_hsva_b` and `nk_strmatch_fuzzy_string`.
2016-05-22 07:38:41 +02:00
vurtun 6577d671d4 Fixed #147 with wrong allegro text input handling 2016-05-21 18:41:33 +02:00