diff options
Diffstat (limited to 'scene/resources/style_box.h')
-rw-r--r-- | scene/resources/style_box.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index 99adbe589a..a1237776c6 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -31,7 +31,7 @@ #ifndef STYLE_BOX_H #define STYLE_BOX_H -#include "core/resource.h" +#include "core/io/resource.h" #include "scene/resources/texture.h" #include "servers/rendering_server.h" @@ -68,10 +68,10 @@ public: class StyleBoxEmpty : public StyleBox { GDCLASS(StyleBoxEmpty, StyleBox); - virtual float get_style_margin(Margin p_margin) const { return 0; } + virtual float get_style_margin(Margin p_margin) const override { return 0; } public: - virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const {} + virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override {} StyleBoxEmpty() {} }; @@ -90,14 +90,13 @@ private: float margin[4]; Rect2 region_rect; Ref<Texture2D> texture; - Ref<Texture2D> normal_map; bool draw_center; Color modulate; AxisStretchMode axis_h; AxisStretchMode axis_v; protected: - virtual float get_style_margin(Margin p_margin) const; + virtual float get_style_margin(Margin p_margin) const override; static void _bind_methods(); public: @@ -115,12 +114,9 @@ public: void set_texture(Ref<Texture2D> p_texture); Ref<Texture2D> get_texture() const; - void set_normal_map(Ref<Texture2D> p_normal_map); - Ref<Texture2D> get_normal_map() const; - void set_draw_center(bool p_enabled); bool is_draw_center_enabled() const; - virtual Size2 get_center_size() const; + virtual Size2 get_center_size() const override; void set_h_axis_stretch_mode(AxisStretchMode p_mode); AxisStretchMode get_h_axis_stretch_mode() const; @@ -131,8 +127,8 @@ public: void set_modulate(const Color &p_modulate); Color get_modulate() const; - virtual Rect2 get_draw_rect(const Rect2 &p_rect) const; - virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const; + virtual Rect2 get_draw_rect(const Rect2 &p_rect) const override; + virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override; StyleBoxTexture(); ~StyleBoxTexture(); @@ -161,7 +157,7 @@ class StyleBoxFlat : public StyleBox { int aa_size; protected: - virtual float get_style_margin(Margin p_margin) const; + virtual float get_style_margin(Margin p_margin) const override; static void _bind_methods(); public: @@ -223,10 +219,10 @@ public: void set_aa_size(const int &p_aa_size); int get_aa_size() const; - virtual Size2 get_center_size() const; + virtual Size2 get_center_size() const override; - virtual Rect2 get_draw_rect(const Rect2 &p_rect) const; - virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const; + virtual Rect2 get_draw_rect(const Rect2 &p_rect) const override; + virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override; StyleBoxFlat(); ~StyleBoxFlat(); @@ -242,7 +238,7 @@ class StyleBoxLine : public StyleBox { float grow_end; protected: - virtual float get_style_margin(Margin p_margin) const; + virtual float get_style_margin(Margin p_margin) const override; static void _bind_methods(); public: @@ -261,9 +257,9 @@ public: void set_grow_end(float p_grow); float get_grow_end() const; - virtual Size2 get_center_size() const; + virtual Size2 get_center_size() const override; - virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const; + virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override; StyleBoxLine(); ~StyleBoxLine(); |