Commit Graph

367 Commits

Author SHA1 Message Date
vurtun
cdaa1f4bda Restore default caps in GLFW/SDL demos #105
All modifed state changed by the demo rendering functions is now set
to default values after being called. I tried to save and restore all
relavent state but for some reason function glBlendEquationSeperate
is not defined for me. So I decided to make it as easy as possible
for me and just set everything to default. This means you have to
either save and restore or reset your own OpenGL state after calling
`nk_xxx_render`. I know it is not perfect but I have no better
solution at this point in time.
2016-04-26 18:24:43 +02:00
Micha Mettke
4de258c256 Merge pull request #112 from mmozeiko/gdip
Demo with Win32 GDI+ rendering
2016-04-26 07:21:27 -07:00
vurtun
4a071b61b0 Added text input and fixed some style issues
Text manipulation in SDL1.2 is quite a pain to say the least. But
since this demo is already quite limited in some aspects I think it
is fine to just get things running. That being said if used seriously
then text input still needs some work.
2016-04-26 14:43:43 +02:00
vurtun
b8e56beceb Merge branch 'sdl1.2' of https://github.com/glegris/nuklear into glegris-sdl1.2 2016-04-26 13:26:27 +02:00
glegris
6e864e076c Add generic comments to explain that line thickness is not used by default 2016-04-25 18:16:29 +02:00
glegris
213a84fcf3 Renamed the sdl1.2 directory to sdl1.2_gfx 2016-04-25 17:59:55 +02:00
glegris
1ce95717bf Add support for the NK_COMMAND_RECT_MULTI_COLOR command and remove the static polygon pointer buffer. 2016-04-25 17:52:49 +02:00
vurtun
62ff1861a4 Hopefully fixed retina display issues #111 #74
I personally do not have a retina display, but I added some changes
to all `GLFW` demos/examples. If there are still issues please
report back to me what is not working correct (please test out clipping
by playing around with scrollbars as well)
2016-04-25 14:07:04 +02:00
glegris
1a794962ed Add demo using SDL 1.2. It's useful for platforms not supported by SDL2. 2016-04-25 09:59:53 +02:00
Martins Mozeiko
c4cf1ad23e Created demo using Win32 GDI+ for rendering. Uses VS2015 for compiler. 2016-04-24 12:10:57 -07:00
Micha Mettke
05ba026b79 Merge pull request #85 from mattn/fix-error
Fix compilation error
2016-04-23 12:07:37 -07:00
vurtun
b86a153b33 Removed C89 errors 2016-04-23 20:54:50 -07:00
Martins Mozeiko
062032e933 Created demo using Direct3D 11 for rendering. Uses VS2015 for compiler.
Also fixes wrong location of GlobalUnlock in GDI rendering demo.
2016-04-23 11:20:47 -07:00
Micha Mettke
87efb61a9f Merge pull request #102 from mmozeiko/gdi
Demo with Win32 GDI rendering
2016-04-23 03:43:13 -07:00
Alastair Hughes
a0710d941f Added an error message if the display can't be opened 2016-04-23 07:54:05 +12:00
Martins Mozeiko
d6ada00cb8 Created demo using Win32 GDI rendering. Uses VS2015 for compiler. 2016-04-22 01:21:19 -07: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
Yasuhiro Matsumoto
af5a1345d0 Fix compilation error 2016-04-20 10:46:48 +09:00
Alexandre Erwin Ittner
72e9496768 Use standard C compiler by default
Always use the standard compiler as defined by the environment
variable CC. User can set it when a different compiler if required
(e.g. CC=clang make)
2016-04-19 21:44:46 -03:00
vurtun
6b5a4f16e8 Merge branch 'fdb-osx-support' 2016-04-19 16:47:09 +02:00
Frederik De Bleser
c2ea5d9927 Set OpenGL profile in SDL
This ensures compatibility with OS X's 1.5 shader version.
2016-04-19 14:05:59 +02:00
Frederik De Bleser
a88293a647 Update Allegro for OS X 2016-04-19 13:55:15 +02:00
Frederik De Bleser
8ca1c35608 Update SDL example for OS X
Just like GLFW example, use different settings in Makefile and
different shader versions.
2016-04-19 13:47:17 +02:00
Frederik De Bleser
a8d124adf1 Avoid conditional includes in SDL example. 2016-04-19 13:46:06 +02:00
Frederik De Bleser
3b29a92f0d Avoid conditional includes.
GLFW will automatically include the correct OpenGL headers, so we can
avoid having a conditional include in our code.
2016-04-19 13:45:51 +02:00
Frederik De Bleser
26fc35ac94 Use lower shader version for better compatibility on OS X
We just need the basic features for getting a texture on screen, so
GLSL version 1.5 is enough.
2016-04-19 13:06:54 +02:00
vurtun
aac47632d0 Fixed #65 wrong parameter to XCreatePixmap
I passed a depth value inside `nk_xsurf_resize` and changed it to
default value. I tested it by removing the resizing code and it
worked for me again. Hopefully this fixes the bug.
2016-04-19 12:54:33 +02:00
vurtun
860fed393e Merge branch 'fix-typos' of https://github.com/waywardmonkeys/nuklear into waywardmonkeys-fix-typos 2016-04-19 11:23:31 +02:00
Frederik De Bleser
5b0b4c9ffd Support OS X for the GLFW demo.
Use conditionals to support the appropriate includes and shader
versions needed for OS X.
2016-04-19 11:02:22 +02:00
Bruce Mitchener
da46d536f9 Fix some typos. 2016-04-19 15:23:33 +07: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
e418ae8c02 Put unicode text input back into xlib demo 2016-04-14 21:02:53 +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
vurtun
f1e81a59ea Added font merging into font atlas and font baker 2016-04-02 19:16:00 +02:00
vurtun
a97ac0ea4d fixed wrong font height 2016-04-01 21:54:55 +02:00
vurtun
d9f1831321 Finally fixed customizable window border width
Previously all window, popup, comboboxes, tooltips, menu and
contextuals had a fixed border width of 1 and had the same color.
Now it is possible to change the individual border width and color of
each one seperatly.
2016-04-01 18:34:16 +02:00
vurtun
08ab2b40c1 Added some additional utility functions
Extended the standard library included functions with some
additional functions depending on <stdarg.h>.
2016-03-31 20:44:03 +02:00
vurtun
e1a1239674 fixed test code 2016-03-31 19:47:40 +02:00
vurtun
4eb939f4db Added additional API for simple color styles
Extended the quite complex style and skinning API with another easier
to use API to set the color scheme of the UI only from color.
2016-03-31 19:31:02 +02:00
vurtun
ca5ec8c2a4 removed test code 2016-03-30 16:20:29 +02:00
vurtun
781202223d Added font atlas, default font + compiler switches
This commit extends the optional currently existing low level font
baking API with another more high level font atlas API.
The font atlas takes away some fine grained memory control from the
user but is easier to use and to understand than the lower level API.

I added combined with the font atlas a optional default font which
allows running the library without a user provided truetype font.
While user friendly it is quite big (~12kb) so I added a compiler flag
to remove it from the library while compiling if not wanted.

Finally I added some additional compiler flags to allow easier to use
APIs. The downside is that all of them require the standard library,
so if you don't want to add the standard C library I would recommend
deactivating all flags marked as standard library flags.
2016-03-30 12:54:22 +02:00
vurtun
f21c835363 fixed piemenu 2016-03-28 12:36:56 +02:00
vurtun
fcba0e676b Added skinning and extend customization
Previous visual changes in the library were quite limited with some
colors and some global properties. This commit changes all that and
provides way more control over every widgets visual appearance.
Changes include extended color selection, per widget properties and
the possibility to use skinning.
While the new API allows for a lot more control it is currently quite
low level and needs a lot more testing and probably another higher
level style API to make changes in code easier. I also had to remove
the style modification code inside the demo and will probably first
try to write another higher level API before adding it back in.

This commit also include some breaking changes to existing code like
the missing style stack API and some widget names changes due to
added granularity granted by the rewritten style.
2016-03-26 16:05:19 +01:00
vurtun
2cedc57f5d Extend default draw command API
The default draw command buffering API now supports filled and
outlined shapes as well as two additional commands: polygon and
polyline. While zahnrad only requires a small number of basic
filled draw command shapes to actual function the underlying canvas
to convert from draw commands to vertex buffer commands allows
for lot more. So the gap should now be filled and drawing more
complex custom is now a little bit easier. I thought about adding a
path drawing API to the draw command API but decided it is not
worth the hassle, at least for now.
2016-03-16 13:01:47 +01:00
vurtun
467118a86e Removed UI recording and revert to old version
I spend the last week(s) with lot of time thinking about this and I
came to the conclusion that recording it is not really worth doing.
In theory it could be interesting but the truth is I don't want to
do any more complex refactoring anymore and want to have a break
from extending this library. I spend over a year on this and I think
it is time for me to move on to other things. I will continue fixing
errors or adding requested essential smaller features but no
more complex rewrites or risky changes.
2016-03-15 21:12:25 +01:00
vurtun
5d54d65894 Removed textual UI representation 2016-03-09 13:12:30 +01:00
vurtun
4f677d200e Fixed C++ build errors 2016-03-08 08:58:55 +01:00
vurtun
68edafcd0c Added 'Enter' and 'Leave' widget events 2016-03-08 08:50:21 +01:00
vurtun
b0cc043879 added missing ifdefs for windows 2016-03-08 08:44:31 +01:00
vurtun
b09849f41a Added script to UI bytecode compile + file browser
This is quite a big commit which adds an experimental text script to
UI bytecode compiler. The compiler is still under heavy development
and can and will be under heavy changes, so use with caution.

In addition I added the old file browser for unix like platforms
back into the demo. At the moment it only supports windows but
the only part of the file browser that is platform dependend
is the directory content loader which should be easy to implement
in other platforms as well.
2016-03-07 18:17:15 +01:00