-
Notifications
You must be signed in to change notification settings - Fork 5
/
patch_le_3_2_x.diff
95 lines (82 loc) · 2.41 KB
/
patch_le_3_2_x.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 7cc47d351e..2156edb911 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#if 0
+
#include "line_edit.h"
#include "core/message_queue.h"
@@ -1878,3 +1880,5 @@ LineEdit::LineEdit() {
LineEdit::~LineEdit() {
}
+
+#endif
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 037238d682..961411b5ec 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -31,6 +31,31 @@
#ifndef LINE_EDIT_H
#define LINE_EDIT_H
+#include "modules/godot_tl/src/controls/tl_line_edit.hpp"
+#include "modules/godot_tl/src/resources/tl_gd_font_wrapper.hpp"
+
+class LineEdit : public TLLineEdit {
+ GDCLASS(LineEdit, TLLineEdit);
+public:
+ void _notification(int p_what) {
+ if ((p_what == NOTIFICATION_THEME_CHANGED) || (p_what == NOTIFICATION_POST_ENTER_TREE)) {
+ Ref<Font> font_w = get_font("font");
+ TLGDFontWrapper *fw_ref = cast_to<TLGDFontWrapper>(*font_w);
+ if (fw_ref) {
+ set_base_font(fw_ref->get_base_font());
+ set_base_font_style(fw_ref->get_base_font_style());
+ set_base_font_size(fw_ref->get_base_font_size());
+ }
+ }
+ }
+
+ LineEdit() {
+ _init();
+ }
+};
+
+#if 0
+
#include "scene/gui/control.h"
#include "scene/gui/popup_menu.h"
@@ -244,3 +269,5 @@ VARIANT_ENUM_CAST(LineEdit::Align);
VARIANT_ENUM_CAST(LineEdit::MenuItems);
#endif
+
+#endif
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 92377949f8..93cc621dfa 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -218,12 +218,12 @@ void SpinBox::_notification(int p_what) {
}
}
-void SpinBox::set_align(LineEdit::Align p_align) {
+void SpinBox::set_align(int p_align) {
line_edit->set_align(p_align);
}
-LineEdit::Align SpinBox::get_align() const {
+int SpinBox::get_align() const {
return line_edit->get_align();
}
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index 04491c8477..5ba31ece9f 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -76,8 +76,8 @@ public:
virtual Size2 get_minimum_size() const;
- void set_align(LineEdit::Align p_align);
- LineEdit::Align get_align() const;
+ void set_align(int p_align);
+ int get_align() const;
void set_editable(bool p_editable);
bool is_editable() const;