patch_9_frame.h
1 #ifndef PATCH_9_FRAME_H
2 #define PATCH_9_FRAME_H
3 
4 #include "scene/gui/control.h"
8 class Patch9Frame : public Control {
9 
10  OBJ_TYPE(Patch9Frame,Control);
11 
12  bool draw_center;
13  int margin[4];
14  Color modulate;
15  Ref<Texture> texture;
16 protected:
17 
18  void _notification(int p_what);
19  virtual Size2 get_minimum_size() const;
20  static void _bind_methods();
21 
22 public:
23 
24  void set_texture(const Ref<Texture>& p_tex);
25  Ref<Texture> get_texture() const;
26 
27  void set_modulate(const Color& p_tex);
28  Color get_modulate() const;
29 
30  void set_patch_margin(Margin p_margin,int p_size);
31  int get_patch_margin(Margin p_margin) const;
32 
33  void set_draw_center(bool p_enable);
34  bool get_draw_center() const;
35 
36  Patch9Frame();
37  ~Patch9Frame();
38 
39 };
40 #endif // PATCH_9_FRAME_H
Definition: patch_9_frame.h:8
Definition: color.h:37
Definition: math_2d.h:65
Definition: control.h:47