summaryrefslogtreecommitdiff
path: root/tools/editor/editor_settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_settings.h')
-rw-r--r--tools/editor/editor_settings.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/tools/editor/editor_settings.h b/tools/editor/editor_settings.h
index ae5bbcca89..d975a7ef86 100644
--- a/tools/editor/editor_settings.h
+++ b/tools/editor/editor_settings.h
@@ -34,6 +34,8 @@
#include "resource.h"
#include "os/thread_safe.h"
#include "core/io/config_file.h"
+#include "translation.h"
+#include "scene/gui/input_action.h"
class EditorPlugin;
@@ -62,7 +64,8 @@ private:
int order;
Variant variant;
bool hide_from_editor;
- VariantContainer(){ order=0; hide_from_editor=false; }
+ bool save;
+ VariantContainer(){ order=0; hide_from_editor=false; save=false;}
VariantContainer(const Variant& p_variant, int p_order) { variant=p_variant; order=p_order; hide_from_editor=false; }
};
@@ -83,13 +86,23 @@ private:
Ref<Resource> clipboard;
+ bool save_changed_setting;
+
+
void _load_defaults(Ref<ConfigFile> p_extra_config = NULL);
+ void _load_default_text_editor_theme();
+
+ bool _save_text_editor_theme(String p_file);
String project_config_path;
Vector<String> favorite_dirs;
Vector<String> recent_dirs;
+ Vector<Ref<Translation> > translations;
+
+ Map<String,Ref<ShortCut> > shortcuts;
+
protected:
static void _bind_methods();
@@ -108,6 +121,7 @@ public:
String get_project_settings_path() const;
+ void setup_language();
void setup_network();
void raise_order(const String& p_name);
@@ -130,6 +144,17 @@ public:
void load_favorites();
+ void list_text_editor_themes();
+ void load_text_editor_theme();
+ bool import_text_editor_theme(String p_file);
+ bool save_text_editor_theme();
+ bool save_text_editor_theme_as(String p_file);
+
+ void add_shortcut(const String& p_name,Ref<ShortCut>& p_shortcut);
+ bool is_shortcut(const String&p_name,const InputEvent& p_event) const;
+ Ref<ShortCut> get_shortcut(const String&p_name) const;
+ void get_shortcut_list(List<String> *r_shortcuts);
+
EditorSettings();
~EditorSettings();
@@ -140,4 +165,8 @@ public:
#define EDITOR_DEF(m_var,m_val) _EDITOR_DEF(m_var,Variant(m_val))
Variant _EDITOR_DEF( const String& p_var, const Variant& p_default);
+#define ED_IS_SHORTCUT(p_name,p_ev) (EditorSettings::get_singleton()->is_shortcut(p_name,p_ev))
+Ref<ShortCut> ED_SHORTCUT(const String& p_path,const String& p_name,uint32_t p_keycode=0);
+Ref<ShortCut> ED_GET_SHORTCUT(const String& p_path);
+
#endif // EDITOR_SETTINGS_H