mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-02 22:35:55 +01:00
Also made it a singleton.
This commit is contained in:
parent
e6adf5aad5
commit
f4b7a3b378
@ -227,6 +227,8 @@ void WebNodeEditor::_notification(int p_what) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebNodeEditor::WebNodeEditor() {
|
WebNodeEditor::WebNodeEditor() {
|
||||||
|
_singleton = this;
|
||||||
|
|
||||||
_prettify_html = true;
|
_prettify_html = true;
|
||||||
|
|
||||||
_web_server = memnew(WebNodeEditorWebServer);
|
_web_server = memnew(WebNodeEditorWebServer);
|
||||||
@ -296,6 +298,7 @@ WebNodeEditor::WebNodeEditor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebNodeEditor::~WebNodeEditor() {
|
WebNodeEditor::~WebNodeEditor() {
|
||||||
|
_singleton = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebNodeEditor::_bind_methods() {
|
void WebNodeEditor::_bind_methods() {
|
||||||
@ -313,3 +316,5 @@ void WebNodeEditor::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("_on_html_previewer_tool_button_toggled", "on"), &WebNodeEditor::_on_html_previewer_tool_button_toggled);
|
ClassDB::bind_method(D_METHOD("_on_html_previewer_tool_button_toggled", "on"), &WebNodeEditor::_on_html_previewer_tool_button_toggled);
|
||||||
ClassDB::bind_method(D_METHOD("_on_html_previewer_visibility_changed"), &WebNodeEditor::_on_html_previewer_visibility_changed);
|
ClassDB::bind_method(D_METHOD("_on_html_previewer_visibility_changed"), &WebNodeEditor::_on_html_previewer_visibility_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebNodeEditor* WebNodeEditor::_singleton = NULL;
|
@ -52,6 +52,8 @@ public:
|
|||||||
void refresh_html_preview();
|
void refresh_html_preview();
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
static WebNodeEditor *get_singleton() { return _singleton; }
|
||||||
|
|
||||||
WebNodeEditor();
|
WebNodeEditor();
|
||||||
~WebNodeEditor();
|
~WebNodeEditor();
|
||||||
|
|
||||||
@ -74,6 +76,9 @@ protected:
|
|||||||
VBoxContainer *_html_previewer;
|
VBoxContainer *_html_previewer;
|
||||||
RichTextLabel *_result_info_label;
|
RichTextLabel *_result_info_label;
|
||||||
TextEdit *_results_label;
|
TextEdit *_results_label;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static WebNodeEditor *_singleton;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user