This commit is contained in:
Juan Linietsky 2015-12-08 11:23:23 -03:00
commit 9637460331
5 changed files with 14 additions and 9 deletions

Binary file not shown.

View file

@ -623,7 +623,7 @@ void FileDialog::_update_drives() {
} }
} }
bool FileDialog::default_show_hidden_files=true; bool FileDialog::default_show_hidden_files=false;
void FileDialog::_bind_methods() { void FileDialog::_bind_methods() {

View file

@ -568,7 +568,7 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
int char_w = 0; int char_w = 0;
if (font != NULL) { if (font != NULL) {
int char_w = font->get_char_size(text[ofs]).width; char_w = font->get_char_size(text[ofs]).width;
} }
pixel_ofs+=char_w; pixel_ofs+=char_w;

View file

@ -34,8 +34,7 @@ void EditorFileDialog::_notification(int p_what) {
fav_down->set_icon(get_icon("MoveDown","EditorIcons")); fav_down->set_icon(get_icon("MoveDown","EditorIcons"));
fav_rm->set_icon(get_icon("RemoveSmall","EditorIcons")); fav_rm->set_icon(get_icon("RemoveSmall","EditorIcons"));
} } else if (p_what==NOTIFICATION_PROCESS) {
if (p_what==NOTIFICATION_PROCESS) {
if (preview_waiting) { if (preview_waiting) {
preview_wheel_timeout-=get_process_delta_time(); preview_wheel_timeout-=get_process_delta_time();
@ -48,12 +47,17 @@ void EditorFileDialog::_notification(int p_what) {
preview_wheel_timeout=0.1; preview_wheel_timeout=0.1;
} }
} }
} } else if (p_what==NOTIFICATION_DRAW) {
if (p_what==NOTIFICATION_DRAW) {
//RID ci = get_canvas_item(); //RID ci = get_canvas_item();
//get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
} else if (p_what==EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files");
if (show_hidden != show_hidden_files) {
set_show_hidden_files(show_hidden);
}
} }
} }
@ -1013,7 +1017,7 @@ void EditorFileDialog::_go_forward(){
} }
bool EditorFileDialog::default_show_hidden_files=true; bool EditorFileDialog::default_show_hidden_files=false;
void EditorFileDialog::set_display_mode(DisplayMode p_mode) { void EditorFileDialog::set_display_mode(DisplayMode p_mode) {
@ -1142,7 +1146,7 @@ void EditorFileDialog::_save_to_recent() {
EditorFileDialog::EditorFileDialog() { EditorFileDialog::EditorFileDialog() {
show_hidden_files=true; show_hidden_files=default_show_hidden_files;
display_mode=DISPLAY_THUMBNAILS; display_mode=DISPLAY_THUMBNAILS;
local_history_pos=0; local_history_pos=0;

View file

@ -4594,6 +4594,7 @@ EditorNode::EditorNode() {
ResourceLoader::set_abort_on_missing_resources(false); ResourceLoader::set_abort_on_missing_resources(false);
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
ResourceLoader::set_error_notify_func(this,_load_error_notify); ResourceLoader::set_error_notify_func(this,_load_error_notify);
ResourceLoader::set_dependency_error_notify_func(this,_dependency_error_report); ResourceLoader::set_dependency_error_notify_func(this,_dependency_error_report);