mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-14 07:40:48 +02:00
Fix binds in HTMLTemplate.
This commit is contained in:
parent
af492fc79e
commit
2fe82c604c
@ -727,11 +727,11 @@ void HTMLTemplate::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("get_template_text", "name"), &HTMLTemplate::get_template_text);
|
ClassDB::bind_method(D_METHOD("get_template_text", "name"), &HTMLTemplate::get_template_text);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression);
|
ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression);
|
||||||
ClassDB::bind_method(D_METHOD("render_template", "text", "request", "data"), &HTMLTemplate::render_template);
|
ClassDB::bind_method(D_METHOD("render_template", "text", "data"), &HTMLTemplate::render_template);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "request", "data"), &HTMLTemplate::get_and_render_template);
|
ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "request", "data"), &HTMLTemplate::get_and_render_template);
|
||||||
|
|
||||||
BIND_VMETHOD(MethodInfo("_render",
|
BIND_VMETHOD(MethodInfo(Variant::STRING, "_render",
|
||||||
PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"),
|
PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"),
|
||||||
PropertyInfo(Variant::DICTIONARY, "data")));
|
PropertyInfo(Variant::DICTIONARY, "data")));
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ void HTMLTemplateData::load_from_string(const String &p_data) {
|
|||||||
// Section header: [ Section Name ]
|
// Section header: [ Section Name ]
|
||||||
// Should not have whitespace in front and back
|
// Should not have whitespace in front and back
|
||||||
String l = lines[i];
|
String l = lines[i];
|
||||||
|
|
||||||
if (l.begins_with("[") && l.ends_with("]")) {
|
if (l.begins_with("[") && l.ends_with("]")) {
|
||||||
if (!current_section_name.empty()) {
|
if (!current_section_name.empty()) {
|
||||||
_templates[current_section_name] = current_str;
|
_templates[current_section_name] = current_str;
|
||||||
|
Loading…
Reference in New Issue
Block a user