diff --git a/modules/text_editor/text_editor_plugin.cpp b/modules/text_editor/text_editor_plugin.cpp index b698b0520..d1a2319d6 100644 --- a/modules/text_editor/text_editor_plugin.cpp +++ b/modules/text_editor/text_editor_plugin.cpp @@ -20,38 +20,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "paint_editor_plugin.h" +#include "text_editor_plugin.h" -#include "paint_window.h" +#include "text_file_editor.h" -void PaintEditorPlugin::make_visible(const bool visible) { +void TextEditorEditorPlugin::make_visible(const bool visible) { window->set_visible(visible); } -String PaintEditorPlugin::get_name() const { - return "Paint"; +String TextEditorEditorPlugin::get_name() const { + return "Text"; } -const Ref PaintEditorPlugin::get_icon() const { +const Ref TextEditorEditorPlugin::get_icon() const { return _icon; } -bool PaintEditorPlugin::has_main_screen() const { +bool TextEditorEditorPlugin::has_main_screen() const { return true; } -PaintEditorPlugin::PaintEditorPlugin(EditorNode *p_node) { +TextEditorEditorPlugin::TextEditorEditorPlugin(EditorNode *p_node) { editor = p_node; - window = memnew(PaintWindow); + window = memnew(TextFileEditor); get_editor_interface()->get_editor_viewport()->add_child(window); - window->set_owner(get_editor_interface()->get_editor_viewport()); make_visible(false); _icon = get_editor_interface()->get_base_control()->get_icon("CanvasModulate", "EditorIcons"); } -PaintEditorPlugin::~PaintEditorPlugin() { +TextEditorEditorPlugin::~TextEditorEditorPlugin() { } -void PaintEditorPlugin::_bind_methods() { +void TextEditorEditorPlugin::_bind_methods() { } diff --git a/modules/text_editor/text_editor_plugin.h b/modules/text_editor/text_editor_plugin.h index 581c74459..91a706b23 100644 --- a/modules/text_editor/text_editor_plugin.h +++ b/modules/text_editor/text_editor_plugin.h @@ -1,5 +1,5 @@ -#ifndef PAINT_EDITOR__PLUGIN_H -#define PAINT_EDITOR__PLUGIN_H +#ifndef TEXT_EDITOR_EDITOR_PLUGIN_H +#define TEXT_EDITOR_EDITOR_PLUGIN_H /* Copyright (c) 2019-2022 Péter Magyar @@ -23,14 +23,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "editor/editor_plugin.h" #include "core/reference.h" +#include "editor/editor_plugin.h" -class PaintWindow; +class TextFileEditor; class Texture; -class PaintEditorPlugin : public EditorPlugin { - GDCLASS(PaintEditorPlugin, EditorPlugin); +class TextEditorEditorPlugin : public EditorPlugin { + GDCLASS(TextEditorEditorPlugin, EditorPlugin); public: void make_visible(const bool visible); @@ -38,12 +38,12 @@ public: bool has_main_screen() const; String get_name() const; - PaintEditorPlugin(EditorNode *p_node); - ~PaintEditorPlugin(); + TextEditorEditorPlugin(EditorNode *p_node); + ~TextEditorEditorPlugin(); EditorNode *editor; - PaintWindow *window; + TextFileEditor *window; protected: static void _bind_methods();