summaryrefslogtreecommitdiffstats
path: root/editor/plugins/text_shader_editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/text_shader_editor.h')
-rw-r--r--editor/plugins/text_shader_editor.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/text_shader_editor.h b/editor/plugins/text_shader_editor.h
index be16148744..61066ed7c6 100644
--- a/editor/plugins/text_shader_editor.h
+++ b/editor/plugins/text_shader_editor.h
@@ -34,7 +34,6 @@
#include "editor/code_editor.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/menu_button.h"
-#include "scene/gui/panel_container.h"
#include "scene/gui/rich_text_label.h"
#include "servers/rendering/shader_warnings.h"
@@ -153,6 +152,7 @@ class TextShaderEditor : public MarginContainer {
bool compilation_success = true;
void _menu_option(int p_option);
+ void _prepare_edit_menu();
mutable Ref<Shader> shader;
mutable Ref<ShaderInclude> shader_inc;
@@ -176,6 +176,7 @@ class TextShaderEditor : public MarginContainer {
uint32_t dependencies_version = 0xFFFFFFFF;
bool trim_trailing_whitespace_on_save;
+ bool trim_final_newlines_on_save;
protected:
void _notification(int p_what);
@@ -189,6 +190,7 @@ protected:
public:
bool was_compilation_successful() const { return compilation_success; }
bool get_trim_trailing_whitespace_on_save() const { return trim_trailing_whitespace_on_save; }
+ bool get_trim_final_newlines_on_save() const { return trim_final_newlines_on_save; }
void apply_shaders();
void ensure_select_current();
void edit(const Ref<Shader> &p_shader);
@@ -196,6 +198,7 @@ public:
void goto_line_selection(int p_line, int p_begin, int p_end);
void save_external_data(const String &p_str = "");
void trim_trailing_whitespace();
+ void trim_final_newlines();
void validate_script();
bool is_unsaved() const;
void tag_saved_version();