summaryrefslogtreecommitdiffstats
path: root/scene/gui/tab_bar.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-02-14 02:11:45 +0100
committerkobewi <kobewi4e@gmail.com>2024-04-11 18:13:29 +0200
commite95e954c68a9a694ad43f622e5424d9e3ec87819 (patch)
treece4ad901a4b049da05ada830063e4e3d84417de0 /scene/gui/tab_bar.h
parentb2f425fe680d1ed5d5b5fa9ae289ae93fd294607 (diff)
downloadredot-engine-e95e954c68a9a694ad43f622e5424d9e3ec87819.tar.gz
Add PropertyListHelper in all simple cases
Diffstat (limited to 'scene/gui/tab_bar.h')
-rw-r--r--scene/gui/tab_bar.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/scene/gui/tab_bar.h b/scene/gui/tab_bar.h
index 65a1d5bd4f..6c09e960f1 100644
--- a/scene/gui/tab_bar.h
+++ b/scene/gui/tab_bar.h
@@ -32,6 +32,7 @@
#define TAB_BAR_H
#include "scene/gui/control.h"
+#include "scene/property_list_helper.h"
#include "scene/resources/text_line.h"
class TabBar : public Control {
@@ -77,8 +78,13 @@ private:
Tab() {
text_buf.instantiate();
}
+
+ Tab(bool p_dummy) {}
};
+ static inline PropertyListHelper base_property_helper;
+ PropertyListHelper property_helper;
+
int offset = 0;
int max_drawn_tab = 0;
int highlight_arrow = -1;
@@ -163,9 +169,11 @@ private:
protected:
virtual void gui_input(const Ref<InputEvent> &p_event) override;
- 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;
+ bool _set(const StringName &p_name, const Variant &p_value) { return property_helper.property_set_value(p_name, p_value); }
+ bool _get(const StringName &p_name, Variant &r_ret) const { return property_helper.property_get_value(p_name, r_ret); }
+ void _get_property_list(List<PropertyInfo> *p_list) const { property_helper.get_property_list(p_list, tabs.size()); }
+ bool _property_can_revert(const StringName &p_name) const { return property_helper.property_can_revert(p_name); }
+ bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return property_helper.property_get_revert(p_name, r_property); }
void _notification(int p_what);
static void _bind_methods();