0.2.0
What's Changed
General
- Add FreeBSD support by @zigster64 in https://github.com/zenith391/zgt/pull/6
- Fix memory leak in calculator example by @iddev5 in https://github.com/zenith391/zgt/pull/7
- Fix overflow in containers.zig by @frmdstryr in https://github.com/zenith391/zgt/pull/11
- Add fn to create ImageData from png buffer using
@embedFileby @frmdstryr in https://github.com/zenith391/zgt/pull/13 - Add
zgt.Scrollablewhich takes any component and makes it scrollable by adding scroll bars by @zenith391 - Add
zgt.Tabsas tab view (note: this component is not done yet) - Add
readOnlyproperty toTextField - Most widgets now use the peer's
getPreferredSize, that is they are now of the correct size. - Add mouse motion event
- Add
Window.getChildto get the child widget of the window - Add
Window.setIconto set the icon (takes anImageData) - Add
Container.getAsas a shorthand for Container.get(...).as(...) - Expose animation lerp function as
zgt.lerp, this is a lerp function for ints, floats and structs that have alerp()function - In
RowandColumn, spacing between elements can now be controlled with.spacing(e.g.Row(.{ .spacing = 10 }, ...)for a spacing of 10 pixels) - Added mobile device 'emulation' by passing
ZGT_MOBILE_EMULATEDenvironment variable, this works similarly to Chrome and Firefox mobile emulation (that is, it only changes the size of the window) - Many fixes in layouting code now allow centering elements.
gtk backend
- Add window icon / icon name by @frmdstryr in https://github.com/zenith391/zgt/pull/15
- Fix
Container.resize(): sizes on the gtk backend are consistent with other backends.
win32 backend
- Added
TextFieldpeer - Added support for building for i386-windows
- Fix Windows build by @marler8997 in https://github.com/zenith391/zgt/pull/4
Note that the win32 backend is still basically pre-alpha and doesn't have feature parity with the gtk backend yet (although it might be reached by 0.2.1)
WebAssembly backend
- Small fixes to make WASM backend compile with examples/demo by @TapioT in https://github.com/zenith391/zgt/pull/5
- Added a dev server: WebAssembly apps can now be 'run' with a web server embedded in build.zig, this helps reduce dev time
C API
Some efforts have been started towards exporting zgt API to C. This will allow zgt to be used in any language with an FFI (given the C ABI is the lingua franca of programming languages).
Currently it is still at an early stage and only supports windows and buttons.
See c_examples/zgt_app.c
Full Changelog: https://github.com/zenith391/zgt/compare/0.1.0...0.2.0