diff options
Diffstat (limited to 'scene/gui/patch_9_rect.h')
-rw-r--r-- | scene/gui/patch_9_rect.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scene/gui/patch_9_rect.h b/scene/gui/patch_9_rect.h index ba978f2f81..602a6d22bf 100644 --- a/scene/gui/patch_9_rect.h +++ b/scene/gui/patch_9_rect.h @@ -38,11 +38,20 @@ class NinePatchRect : public Control { GDCLASS(NinePatchRect, Control); +public: + enum AxisStretchMode { + AXIS_STRETCH_MODE_STRETCH, + AXIS_STRETCH_MODE_TILE, + AXIS_STRETCH_MODE_TILE_FIT, + }; + bool draw_center; int margin[4]; Rect2 region_rect; Ref<Texture> texture; + AxisStretchMode axis_h, axis_v; + protected: void _notification(int p_what); virtual Size2 get_minimum_size() const; @@ -61,7 +70,15 @@ public: void set_draw_center(bool p_enable); bool get_draw_center() const; + void set_h_axis_stretch_mode(AxisStretchMode p_mode); + AxisStretchMode get_h_axis_stretch_mode() const; + + void set_v_axis_stretch_mode(AxisStretchMode p_mode); + AxisStretchMode get_v_axis_stretch_mode() const; + NinePatchRect(); ~NinePatchRect(); }; + +VARIANT_ENUM_CAST(NinePatchRect::AxisStretchMode) #endif // PATCH_9_FRAME_H |