Add ptr() / ptrw() to the arrays, add missing String methods, add missing CharString method implementations.

This commit is contained in:
bruvzg
2022-02-09 12:36:22 +02:00
parent be34bcfff1
commit bf8fc4c53d
20 changed files with 380 additions and 158 deletions

View File

@@ -37,9 +37,11 @@
namespace godot {
class Rect2i {
public:
_FORCE_INLINE_ GDNativeTypePtr ptr() const { return (void *)this; }
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
friend class Variant;
public:
Point2i position;
Size2i size;
@@ -107,7 +109,7 @@ public:
new_rect.size.x = Math::max(p_rect.position.x + p_rect.size.x, position.x + size.x);
new_rect.size.y = Math::max(p_rect.position.y + p_rect.size.y, position.y + size.y);
new_rect.size = new_rect.size - new_rect.position; //make relative again
new_rect.size = new_rect.size - new_rect.position; // make relative again
return new_rect;
}