Refactored binding system for core types
Moved to a system using variadic templates, shared with CallableBind. New code is cleaner, faster and allows for much better optimization of core type functions from GDScript and GDNative. Added Variant::InternalMethod function for direct call access.
This commit is contained in:
parent
bc91e088e4
commit
b8c64184c6
15 changed files with 2229 additions and 1611 deletions
|
|
@ -197,6 +197,10 @@ struct Rect2 {
|
|||
return g;
|
||||
}
|
||||
|
||||
inline Rect2 grow_margin_bind(uint32_t p_margin, real_t p_amount) const {
|
||||
return grow_margin(Margin(p_margin), p_amount);
|
||||
}
|
||||
|
||||
inline Rect2 grow_individual(real_t p_left, real_t p_top, real_t p_right, real_t p_bottom) const {
|
||||
Rect2 g = *this;
|
||||
g.position.x -= p_left;
|
||||
|
|
@ -363,6 +367,10 @@ struct Rect2i {
|
|||
return g;
|
||||
}
|
||||
|
||||
inline Rect2i grow_margin_bind(uint32_t p_margin, int p_amount) const {
|
||||
return grow_margin(Margin(p_margin), p_amount);
|
||||
}
|
||||
|
||||
inline Rect2i grow_individual(int p_left, int p_top, int p_right, int p_bottom) const {
|
||||
Rect2i g = *this;
|
||||
g.position.x -= p_left;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue