v0.2.0
Full Changelog: v0.1.7...v0.2.0
Huge UX improvements!
- relaxed API struct requirements, making Godot 4.4.1 or something work again (reported by @VBismuth)
- added
pandptfor easy printing with varargs
gd.p('player', player)
gd.pt(2, 4, 6, 8, 'who', 'do', 'we', 'appreciate', true)Note: this only works on builtin types and any type that explicitly defines a
str() stringmethod. This is a bug/lacking-feature I found in V and made an issue for here. After that gets merged these should work for any type ever, with no need for an explicitstrmethod.
- made variant functions have more convenient arg types (removed indirection)
- added some Godot type aliases:
pub type Bool = bool
pub type Int = i64
pub type Float = f64- this lets us add methods to them
- notably I added
to_variantto them all, which lets us... 👇 - all functions that accepted
Variantnow acceptToVariant, and converts them within- this is SOOOOO much nicer! No more wrapping args as variants!
- converted arg types for builtin classes to V types
- this was already how it worked for Object-based classes (ex:
Node,Control, etc.), but now is how it works for packed struct as well (ex:Vector2,Array, etc.)
- this was already how it worked for Object-based classes (ex:
- converted arg types for all constructor methods to V types
- ex:
Signal.new2,Callable.new2
- ex:
Some of the above things work together to make things much nicer.
Things like creating Callables, Signals, and Arrays, and supplying args to Signal#emit for example.