diff options
Diffstat (limited to 'tools/editor/project_manager.cpp')
-rw-r--r-- | tools/editor/project_manager.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 04705017d2..589d9d3d99 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -348,6 +348,13 @@ struct ProjectItem { _FORCE_INLINE_ bool operator ==(const ProjectItem& l) const { return project==l.project; } }; +void ProjectManager::_notification(int p_what) { + + if (p_what==NOTIFICATION_ENTER_TREE) { + + get_tree()->set_editor_hint(true); + } +} void ProjectManager::_panel_draw(Node *p_hb) { @@ -825,6 +832,19 @@ ProjectManager::ProjectManager() { FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); set_area_as_parent_rect(); + + Ref<Theme> theme = Ref<Theme>( memnew( Theme ) ); + set_theme(theme); + editor_register_icons(theme); + + String global_font = EditorSettings::get_singleton()->get("global/font"); + if (global_font!="") { + Ref<Font> fnt = ResourceLoader::load(global_font); + if (fnt.is_valid()) { + theme->set_default_theme_font(fnt); + } + } + Panel *panel = memnew( Panel ); add_child(panel); panel->set_area_as_parent_rect(); @@ -944,7 +964,7 @@ ProjectManager::ProjectManager() { String cp; cp.push_back(0xA9); cp.push_back(0); - l->set_text(cp+" 2008-2015 Juan Linietsky, Ariel Manzur."); + l->set_text(cp+" 2008-2016 Juan Linietsky, Ariel Manzur."); l->set_align(Label::ALIGN_CENTER); vb->add_child(l); @@ -972,10 +992,6 @@ ProjectManager::ProjectManager() { npdialog = memnew( NewProjectDialog ); add_child(npdialog); - Ref<Theme> theme = memnew( Theme ); - editor_register_icons(theme); - set_theme(theme); - npdialog->connect("project_created", this,"_load_recent_projects"); _load_recent_projects(); |