You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Move editor paths into the EditorPaths class
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_feature_profile.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_paths.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
|
||||
@@ -378,7 +379,7 @@ void CreateDialog::_confirmed() {
|
||||
}
|
||||
|
||||
{
|
||||
Ref<FileAccess> f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::WRITE);
|
||||
Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::WRITE);
|
||||
if (f.is_valid()) {
|
||||
f->store_line(selected_item);
|
||||
|
||||
@@ -655,7 +656,7 @@ void CreateDialog::_save_and_update_favorite_list() {
|
||||
TreeItem *root = favorites->create_item();
|
||||
|
||||
{
|
||||
Ref<FileAccess> f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("favorites." + base_type), FileAccess::WRITE);
|
||||
Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("favorites." + base_type), FileAccess::WRITE);
|
||||
if (f.is_valid()) {
|
||||
for (int i = 0; i < favorite_list.size(); i++) {
|
||||
String l = favorite_list[i];
|
||||
@@ -680,7 +681,7 @@ void CreateDialog::_save_and_update_favorite_list() {
|
||||
}
|
||||
|
||||
void CreateDialog::_load_favorites_and_history() {
|
||||
String dir = EditorSettings::get_singleton()->get_project_settings_dir();
|
||||
String dir = EditorPaths::get_singleton()->get_project_settings_dir();
|
||||
Ref<FileAccess> f = FileAccess::open(dir.plus_file("create_recent." + base_type), FileAccess::READ);
|
||||
if (f.is_valid()) {
|
||||
while (!f->eof_reached()) {
|
||||
|
||||
Reference in New Issue
Block a user