summaryrefslogtreecommitdiff
path: root/scene/resources/style_box.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-18 14:06:04 +0200
committerGitHub <noreply@github.com>2017-07-18 14:06:04 +0200
commit0afa77a8a2e148fac6b57fab3e85c6e631e12c63 (patch)
tree1d1f89e19f9dda09d4c4c6c246ec6f510f251047 /scene/resources/style_box.h
parente21ea393ea9d69a53f82ec4aa6d8c7f05c16979a (diff)
parent17c3422431c3312d6e124b0afa871fd166928669 (diff)
Merge pull request #9689 from djrm/theme_fixes
Added separators using StyleBoxLine, some theme style fixes
Diffstat (limited to 'scene/resources/style_box.h')
-rw-r--r--scene/resources/style_box.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index 7547c2ea81..64ce3528aa 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -164,4 +164,38 @@ public:
~StyleBoxFlat();
};
+// just used to draw lines.
+class StyleBoxLine : public StyleBox {
+
+ GDCLASS(StyleBoxLine, StyleBox);
+ Color color;
+ int thickness;
+ bool vertical;
+ float grow;
+
+protected:
+ virtual float get_style_margin(Margin p_margin) const;
+ static void _bind_methods();
+
+public:
+ void set_color(const Color &p_color);
+ Color get_color() const;
+
+ void set_thickness(int p_thickness);
+ int get_thickness() const;
+
+ void set_vertical(bool p_vertical);
+ bool is_vertical() const;
+
+ void set_grow(float p_grow);
+ float get_grow() const;
+
+ virtual Size2 get_center_size() const;
+
+ virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const;
+
+ StyleBoxLine();
+ ~StyleBoxLine();
+};
+
#endif