From a9a5b8adaa257ccb501faedd4c191c0c90a79fa4 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 25 Jun 2022 12:29:50 +0200 Subject: [PATCH] Getter/Setter for the result. --- modules/web/html/html_builder_bind.cpp | 7 +++++++ modules/web/html/html_builder_bind.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/web/html/html_builder_bind.cpp b/modules/web/html/html_builder_bind.cpp index 891ce95db..036e692c5 100644 --- a/modules/web/html/html_builder_bind.cpp +++ b/modules/web/html/html_builder_bind.cpp @@ -852,6 +852,13 @@ void _HTMLTag::_bind_methods() { ClassDB::bind_method(D_METHOD("style", "val"), &_HTMLTag::style); } +String _HTMLBuilder::get_result() { + return result; +} +void _HTMLBuilder::set_result(const String &str) { + result = str; +} + Ref<_HTMLBuilder> _HTMLBuilder::comment(const String &val) { write_tag(); diff --git a/modules/web/html/html_builder_bind.h b/modules/web/html/html_builder_bind.h index b97f5ae09..26862b236 100644 --- a/modules/web/html/html_builder_bind.h +++ b/modules/web/html/html_builder_bind.h @@ -198,7 +198,8 @@ class _HTMLBuilder : public Reference { GDCLASS(_HTMLBuilder, Reference) public: - String result; + String get_result(); + void set_result(const String &str); Ref<_HTMLBuilder> comment(const String &val); Ref<_HTMLTag> doctype(); @@ -553,6 +554,8 @@ public: _HTMLBuilder(); virtual ~_HTMLBuilder(); + String result; + protected: static void _bind_methods();