mirror of
https://github.com/4sval/FModel.git
synced 2026-12-05 07:42:19 -06:00
You have no choice now
This commit is contained in:
@@ -75,12 +75,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Menu Grid.Column="0">
|
||||
<Menu>
|
||||
<MenuItem Header="Directory">
|
||||
<MenuItem Header="Selector" Command="{Binding MenuCommand}" CommandParameter="Directory_Selector">
|
||||
<MenuItem.Icon>
|
||||
@@ -234,18 +229,6 @@
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="Preview New Explorer System" VerticalAlignment="Center" />
|
||||
<CheckBox Grid.Column="1" Margin="5 2 5 0" Unchecked="FeaturePreviewOnUnchecked" KeyboardNavigation.TabNavigation="None" KeyboardNavigation.ControlTabNavigation="None"
|
||||
IsChecked="{Binding FeaturePreviewNewAssetExplorer, Source={x:Static settings:UserSettings.Default}, Mode=TwoWay}"
|
||||
Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="RootGrid" Grid.Row="2">
|
||||
|
||||
@@ -34,7 +34,7 @@ public partial class MainWindow
|
||||
CommandBindings.Add(new CommandBinding(ApplicationCommands.Find, (_, _) => OnOpenAvalonFinder()));
|
||||
CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseBack, (_, _) =>
|
||||
{
|
||||
if (UserSettings.Default.FeaturePreviewNewAssetExplorer && !_applicationView.IsAssetsExplorerVisible)
|
||||
if (!_applicationView.IsAssetsExplorerVisible)
|
||||
{
|
||||
// back browsing the json view will reopen the assets explorer
|
||||
_applicationView.IsAssetsExplorerVisible = true;
|
||||
@@ -201,7 +201,7 @@ public partial class MainWindow
|
||||
OnExportHotkey("Save_Audio");
|
||||
else if (_applicationView.Status.IsReady && UserSettings.Default.ExportCode.IsTriggered(e.Key))
|
||||
OnExportHotkey("Save_Code");
|
||||
else if (_applicationView.Status.IsReady && UserSettings.Default.FeaturePreviewNewAssetExplorer && UserSettings.Default.SwitchAssetExplorer.IsTriggered(e.Key))
|
||||
else if (_applicationView.Status.IsReady && UserSettings.Default.SwitchAssetExplorer.IsTriggered(e.Key))
|
||||
_applicationView.IsAssetsExplorerVisible = !_applicationView.IsAssetsExplorerVisible;
|
||||
else if (UserSettings.Default.AssetAddTab.IsTriggered(e.Key))
|
||||
_applicationView.CUE4Parse.TabControl.AddTab();
|
||||
@@ -293,15 +293,10 @@ public partial class MainWindow
|
||||
|
||||
public void SelectAsset(GameFileViewModel asset)
|
||||
{
|
||||
var useExplorer = UserSettings.Default.FeaturePreviewNewAssetExplorer;
|
||||
_applicationView.SelectedLeftTabIndex = 1;
|
||||
_applicationView.IsAssetsExplorerVisible = true;
|
||||
|
||||
_applicationView.SelectedLeftTabIndex = useExplorer ? 1 : 2;
|
||||
if (useExplorer)
|
||||
{
|
||||
_applicationView.IsAssetsExplorerVisible = true;
|
||||
}
|
||||
|
||||
var list = useExplorer ? UserSettings.Default.ExplorerViewMode == EExplorerViewMode.List ? AssetsListExplorer : AssetsExplorer : AssetsListName;
|
||||
var list = UserSettings.Default.ExplorerViewMode == EExplorerViewMode.List ? AssetsListExplorer : AssetsExplorer;
|
||||
list.GetBindingExpression(ItemsControl.ItemsSourceProperty)?.UpdateTarget();
|
||||
list.UnselectAll();
|
||||
list.SelectedItem = asset;
|
||||
@@ -370,11 +365,6 @@ public partial class MainWindow
|
||||
}
|
||||
}
|
||||
|
||||
private void FeaturePreviewOnUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_applicationView.IsAssetsExplorerVisible = false;
|
||||
}
|
||||
|
||||
private void OnExportHotkey(string trigger)
|
||||
{
|
||||
if (!_applicationView.Status.IsReady || Keyboard.FocusedElement is not DependencyObject focused)
|
||||
|
||||
@@ -684,13 +684,6 @@ public sealed class UserSettings : ViewModel
|
||||
set => SetProperty(ref _saveHdrTexturesAsHdr, value);
|
||||
}
|
||||
|
||||
private bool _featurePreviewNewAssetExplorer = true;
|
||||
public bool FeaturePreviewNewAssetExplorer
|
||||
{
|
||||
get => _featurePreviewNewAssetExplorer;
|
||||
set => SetProperty(ref _featurePreviewNewAssetExplorer, value);
|
||||
}
|
||||
|
||||
private EExplorerPreviewMode _explorerPreviewMode = EExplorerPreviewMode.All;
|
||||
public EExplorerPreviewMode ExplorerPreviewMode
|
||||
{
|
||||
|
||||
@@ -52,13 +52,7 @@ public class ApplicationViewModel : ViewModel
|
||||
public bool IsAssetsExplorerVisible
|
||||
{
|
||||
get => _isAssetsExplorerVisible;
|
||||
set
|
||||
{
|
||||
if (value && !UserSettings.Default.FeaturePreviewNewAssetExplorer)
|
||||
return;
|
||||
|
||||
SetProperty(ref _isAssetsExplorerVisible, value);
|
||||
}
|
||||
set => SetProperty(ref _isAssetsExplorerVisible, value);
|
||||
}
|
||||
|
||||
public event EventHandler AssetResolutionRequested;
|
||||
|
||||
Reference in New Issue
Block a user