mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
Merge pull request #274 from git2013vb/master
Added current folder as default path
This commit is contained in:
@@ -25,7 +25,7 @@ use fyrox::{
|
||||
};
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
sync::mpsc::Sender,
|
||||
sync::mpsc::Sender, env,
|
||||
};
|
||||
|
||||
#[derive(Default, Eq, PartialEq)]
|
||||
@@ -82,6 +82,8 @@ impl Configurator {
|
||||
let select_work_dir;
|
||||
let ok;
|
||||
let tb_work_dir;
|
||||
|
||||
let current_path = env::current_dir().unwrap();
|
||||
|
||||
let filter = Filter::new(|p: &Path| p.is_dir());
|
||||
|
||||
@@ -151,8 +153,10 @@ impl Configurator {
|
||||
WidgetBuilder::new()
|
||||
.on_row(0)
|
||||
.on_column(1)
|
||||
.with_margin(Thickness::uniform(1.0)),
|
||||
.with_margin(Thickness::uniform(1.0))
|
||||
.with_enabled(false)
|
||||
)
|
||||
.with_text((current_path.clone()).into_os_string().into_string().unwrap())
|
||||
.with_vertical_text_alignment(VerticalAlignment::Center)
|
||||
.build(ctx);
|
||||
tb_work_dir
|
||||
@@ -205,7 +209,7 @@ impl Configurator {
|
||||
.with_child({
|
||||
ok = ButtonBuilder::new(
|
||||
WidgetBuilder::new()
|
||||
.with_enabled(false) // Disabled by default.
|
||||
.with_enabled(true) // Enabled by default.
|
||||
.with_width(80.0)
|
||||
.with_height(25.0)
|
||||
.with_margin(Thickness::uniform(1.0)),
|
||||
@@ -236,7 +240,7 @@ impl Configurator {
|
||||
ok,
|
||||
sender,
|
||||
tb_work_dir,
|
||||
work_dir: Default::default(),
|
||||
work_dir: current_path,
|
||||
lv_history,
|
||||
history,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user