summaryrefslogtreecommitdiff
path: root/scene/resources/style_box.h
diff options
context:
space:
mode:
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