summaryrefslogtreecommitdiff
path: root/scene/gui/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/button.h')
-rw-r--r--scene/gui/button.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/scene/gui/button.h b/scene/gui/button.h
index 5b44b1322e..da89e5e6c4 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -32,6 +32,7 @@
#define BUTTON_H
#include "scene/gui/base_button.h"
+#include "scene/resources/text_paragraph.h"
class Button : public BaseButton {
GDCLASS(Button, BaseButton);
@@ -47,23 +48,45 @@ private:
bool flat;
String text;
String xl_text;
+ Ref<TextParagraph> text_buf;
+
+ Dictionary opentype_features;
+ String language;
+ TextDirection text_direction = TEXT_DIRECTION_AUTO;
+
Ref<Texture2D> icon;
bool expand_icon;
bool clip_text;
TextAlign align;
float _internal_margin[4];
+ void _shape();
+
protected:
void _set_internal_margin(Margin p_margin, float p_value);
void _notification(int p_what);
static void _bind_methods();
+ bool _set(const StringName &p_name, const Variant &p_value);
+ bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _get_property_list(List<PropertyInfo> *p_list) const;
+
public:
virtual Size2 get_minimum_size() const override;
void set_text(const String &p_text);
String get_text() const;
+ void set_text_direction(TextDirection p_text_direction);
+ TextDirection get_text_direction() const;
+
+ void set_opentype_feature(const String &p_name, int p_value);
+ int get_opentype_feature(const String &p_name) const;
+ void clear_opentype_features();
+
+ void set_language(const String &p_language);
+ String get_language() const;
+
void set_icon(const Ref<Texture2D> &p_icon);
Ref<Texture2D> get_icon() const;