diff options
Diffstat (limited to 'scene/resources/style_box.h')
-rw-r--r-- | scene/resources/style_box.h | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index f667318e24..f8b02724ee 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -37,7 +37,7 @@ */ class StyleBox : public Resource { - OBJ_TYPE( StyleBox, Resource ); + GDCLASS( StyleBox, Resource ); RES_BASE_EXTENSION("sbx"); OBJ_SAVE_TYPE( StyleBox ); float margin[4]; @@ -65,7 +65,7 @@ public: class StyleBoxEmpty : public StyleBox { - OBJ_TYPE( StyleBoxEmpty, StyleBox ); + GDCLASS( StyleBoxEmpty, StyleBox ); virtual float get_style_margin(Margin p_margin) const { return 0; } public: @@ -76,7 +76,7 @@ public: class StyleBoxTexture : public StyleBox { - OBJ_TYPE( StyleBoxTexture, StyleBox ); + GDCLASS( StyleBoxTexture, StyleBox ); float expand_margin[4]; @@ -123,7 +123,7 @@ public: class StyleBoxFlat : public StyleBox { - OBJ_TYPE( StyleBoxFlat, StyleBox ); + GDCLASS( StyleBoxFlat, StyleBox ); Color bg_color; Color light_color; @@ -167,35 +167,5 @@ public: }; -class StyleBoxImageMask : public StyleBox { - - OBJ_TYPE( StyleBoxImageMask, StyleBox ); - virtual float get_style_margin(Margin p_margin) const { return 0; } - - Image image; - float expand_margin[4]; - bool expand; - -protected: - - static void _bind_methods(); - -public: - - virtual void draw(RID p_canvas_item,const Rect2& p_rect) const {} - virtual bool test_mask(const Point2& p_point, const Rect2& p_rect) const; - - void set_image(const Image& p_image); - Image get_image() const; - - void set_expand(bool p_expand); - bool get_expand() const; - void set_expand_margin_size(Margin p_expand_margin,float p_size); - float get_expand_margin_size(Margin p_expand_margin) const; - - StyleBoxImageMask(); - -}; - #endif |