Commit Graph

926 Commits

Author SHA1 Message Date
richi c3da9dc2b6 vertexes -> vertices 2016-02-01 09:42:05 +01:00
vurtun 6af22b621f fixed missing C++ void* to char* cast 2016-02-01 09:26:22 +01:00
vurtun 1c3d60c260 Convert overdraw in general case to special case
One of the big problems with transparency while using the vertex
buffer output is that repeated overdraw causes artifacts.
Inherintly that is not a problem if there is no overdraw except
zr_widget_field which relies on it for text selection. So I
previously used overdraw for every text, which caused problems.
With this update only zr_widget_field uses overdraw while
every normal text does not.
2016-02-01 09:26:22 +01:00
vurtun b2e99df63d Added enter event to edit widget
Decided to add support for commit the content of a edit wiget
content by enter if a flag was set. Tried to add other flags
like auto complete but failed for now to find a good way.
Also more importantly added `zr_edit_box` to filter callback.
2016-02-01 09:26:22 +01:00
vurtun 88e40646b8 fixed missing C++ void* to char* cast 2016-01-31 20:12:05 +01:00
vurtun 983a23a130 Convert overdraw in general case to special case
One of the big problems with transparency while using the vertex
buffer output is that repeated overdraw causes artifacts.
Inherintly that is not a problem if there is no overdraw except
zr_widget_field which relies on it for text selection. So I
previously used overdraw for every text, which caused problems.
With this update only zr_widget_field uses overdraw while
every normal text does not.
2016-01-30 14:54:22 +01:00
vurtun c628115369 Added enter event to edit widget
Decided to add support for commit the content of a edit wiget
content by enter if a flag was set. Tried to add other flags
like auto complete but failed for now to find a good way.
Also more importantly added `zr_edit_box` to filter callback.
2016-01-30 11:46:54 +01:00
vurtun 96fe7f7775 Added a global alpha modifier to zr_convert
Previously it was not possible to control the visibility or rather
the transparency of all render vertex buffer output. For that to
change another settings was added to zr_convert_config to control
the visibility. To achieve the same result as previously it is now
required to fill that property with 1.0f. To make all GUI element
as a whole more transparent a value between 0.0 and 1.0 can be
selected with 0.0 being completely hidden and 1.0f completly
visible.
2016-01-28 22:24:54 +01:00
vurtun 967b6feb30 updated Readme 2016-01-28 15:56:15 +01:00
vurtun 7fa59b8ba5 Removed commented out old code 2016-01-27 10:51:58 +01:00
vurtun 19a49780f7 Added event based updates back into examples
After some thought I decided to turn all examples back into
event based updated UIs. While it is possible to run all
examples without vsync with good performance it is probably best to
keep the examples in a accessable format which makes it possible
to be just by as many people as possible.
2016-01-26 22:52:09 +01:00
vurtun 5c8cc7228c removed tab input code 2016-01-26 21:38:54 +01:00
vurtun 9757f59c66 Finally fixed the oldest bug in this library
For now month I failed to find out why text calculation was
bugged for zahnrads own vertex buffer font. I finally found
the problem and fixed it.
2016-01-26 14:56:28 +01:00
vurtun 0970db1088 Removed event based updates for examples
Previously all examples used an event based update scheme since
they caused performance issues on Linux. Further testing revealed
that vsync + tripple buffering causes problems and just needs to be
turned off to smoothly run all examples.
2016-01-25 23:42:21 +01:00
vurtun 168c45e72c corrected combobox text background color
The selected item text of text combo boxes used the window color
as background instead of the combo box own background color.
2016-01-25 23:10:56 +01:00
vurtun 1365fb59ef Fixed text drawing for vertex buffer output
Previoulsy if you select text while using the vertex buffer
output inside a single line edit widget you would get a drawing bug
and the selected text would get transparent. This was caused by
overdraw by the selected text while the unselected text is still
visible.
To fix this behavior the text background is cleared before drawing.
This will cost another rectangle for each text which is quite
wasteful. Probably have to think about way to only draw the
rectangle if really necessary.
2016-01-25 22:41:35 +01:00
vurtun fe2e863a72 Fixed currently active txt input user modification
If a currently active `zr_edit_string` or `zr_edit_buffer` string
buffers is modified outside both of these function then the
controlling cursor could get out of bounds.
To make sure this does not happen anymore I added some check to
make sure cursors are always valid.
2016-01-23 19:40:02 +01:00
vurtun 0bceb4b37d Removed disabled multiline editbox with scrollbar
Need to revert a previously added change to read only
edit boxes which deactivated the input but thereby
also deactivated the scrollbar behavior which is not
wanted.
2016-01-21 22:08:20 +01:00
vurtun 40c74cab1f updated contributing 2016-01-21 18:52:03 +01:00
vurtun d4b89415e1 Added commiting changes in zr_property using enter
Previously if you want to edit the content if a zr_property the
cursor would appear at the beginning of the line which makes
editing the content cumbersome since you then have to move the
cursor to the end of the line to start editing. In addition
it was required to commit the edited value inside the zr_property
by clicking outside the zr_property.

With this commit if you click inside the property to start editing
the cursor will be placed at the end of the text input. In addition
it is now possible to commit written changes by pressing enter.
2016-01-21 18:46:54 +01:00
vurtun 69ec0178f9 Fixed logic for flag ZR_EDIT_READ_ONLY in zr_edit
zr_edit_string and zr_edit_buffer with varying flags did not have the
correct implementation for the read only mode flag and allowed
writing in some instances and showed a cursor while active
for other. Some additional check have been added to make sure that
read only edit buffer cannot be modified anymore.
2016-01-21 17:26:57 +01:00
vurtun e015c447ec Added defines to prevent symbol collision with stb
If you already have stb_rect_pack.h and stb_truetype.h inside your
project zahnrad will cause symbol collisions since it will import
the implementation a second time.

To prevent this from happening I added two defines which can be set
to 1 to disable the implementation generation of both stb_truetype.h
as well as stb_rect_pack.h in zahnrad.
2016-01-21 00:41:02 +01:00
vurtun c98153b59a removed need to pass string id to combobox 2016-01-20 19:36:40 +01:00
Micha Mettke 14a38dde61 Merge pull request #44 from richi/master
Show and hide onscreen keyboard
2016-01-20 13:49:57 +01:00
richi 67c5d53348 Calling zr_layout_peek first
Calling zr_layout_peek before zr_edit_string
2016-01-20 13:45:19 +01:00
richi b73aa6ae74 Automatically show and hide the onscreen keyboard
This is an example how to show and hide a onscreen keyboard. The logic
is implemented in zr_touch_edit_string
2016-01-20 12:43:58 +01:00
richi aa64398646 ifndef MIN, MAX and CLAMP
Does make live a lot easier for backends.
2016-01-20 12:35:31 +01:00
richi ba9ca057f2 Merge remote-tracking branch 'vurtun/master' 2016-01-20 11:00:32 +01:00
vurtun 4e7c183aa6 Merge branch 'master' of https://github.com/vurtun/gui 2016-01-20 03:15:56 +01:00
vurtun 096cf3d27f extended to return more state information 2016-01-20 03:15:38 +01:00
Micha Mettke a2e741d540 Merge pull request #43 from richi/master
Text input on iOS and tvOS
2016-01-20 02:15:40 +01:00
richi c462ee09ac Text input on iOS and tvOS
This commit does implement text input for iOS and tvOS using the native
onscreen keyboard.
2016-01-19 18:24:43 +01:00
vurtun d32d2f9ea3 loose 80 character column width limit 2016-01-19 15:25:38 +01:00
vurtun 36c97af82d removed progressbar rounding to prevent drawing bug 2016-01-18 11:05:29 +01:00
Micha Mettke 091df6ed73 Merge pull request #42 from richi/master
Backends for Mac OS X, iOS and tvOS
2016-01-17 16:57:07 +01:00
richi 52a936d98b Small bug fix in zr_free_window
win->next can be zero and win->prev probably as well.
2016-01-17 16:42:29 +01:00
richi 5d1fdcdbe2 Backends for Mac OS X, iOS and tvOS
This is a bunch of experimental render backends for Mac OS X, iOS and
tvOS.
2016-01-17 16:09:59 +01:00
vurtun 9f067e37c2 added helper to verify zr_layout_push and zr_layout_pop 2016-01-16 22:08:08 +01:00
vurtun 5a82e1acac provided 'zr_draw_symbol' with own style structure for better readability 2016-01-16 21:56:23 +01:00
vurtun 02a8a682db fixed list window list removing 2016-01-16 21:30:56 +01:00
vurtun a8ea26e9f4 updated contributing.md 2016-01-15 13:17:37 +01:00
vurtun 53ed2563a8 added touch padding to button + toggles + fixed non-active edit box scrolling 2016-01-15 13:10:38 +01:00
vurtun 4a49bfe64f updated opengl demos 2016-01-14 15:25:35 +01:00
vurtun 0c9b5ba1c7 devided AA into line and shape AA 2016-01-14 14:58:38 +01:00
vurtun 127124c7b9 fixed #40 2016-01-14 13:24:24 +01:00
vurtun d21af11d9d fixed window drawing without header 2016-01-13 19:58:20 +01:00
vurtun e40e7de0d9 fixed border of minimized windows 2016-01-13 19:33:32 +01:00
vurtun 6ee7b26aec removed delayed frame for window minimizing/maximizing 2016-01-13 18:57:04 +01:00
vurtun daead24a67 fixed changing window activation even if contextual menu is active 2016-01-13 16:59:21 +01:00
vurtun d0e3f73044 fixed property dragging 2016-01-13 16:43:52 +01:00