Skip to content

Commit

Permalink
Merge pull request donkeyProgramming#208 from Pear-231/BugFixes-PackF…
Browse files Browse the repository at this point in the history
…ileBrowser-And-UI-Oh-My!

Bug fixes, pack file browser, and UI, oh my!
  • Loading branch information
donkeyProgramming authored Dec 9, 2024
2 parents ac26bcd + 27bcbc9 commit 280d294
Show file tree
Hide file tree
Showing 139 changed files with 1,556 additions and 503 deletions.
7 changes: 5 additions & 2 deletions AssetEditor/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Shared.Core.DependencyInjection;
using Shared.Core.DevConfig;
using Shared.Core.ErrorHandling;
using Shared.Core.ErrorHandling.Exceptions;
using Shared.Core.PackFiles;
using Shared.Core.Services;
using Shared.Core.Settings;
Expand Down Expand Up @@ -93,8 +92,12 @@ void ShowMainWindow()
mainWindow.DataContext = _rootScope.ServiceProvider.GetRequiredService<MainViewModel>();
mainWindow.Show();

// Ensure the window doesn't cover up the windows bar.
mainWindow.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
mainWindow.MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;

if (applicationSettingsService.CurrentSettings.StartMaximised == true)
mainWindow.WindowState = WindowState.Maximized;
SystemCommands.MaximizeWindow(mainWindow);
}

void DispatcherUnhandledExceptionHandler(object sender, DispatcherUnhandledExceptionEventArgs args)
Expand Down
2 changes: 1 addition & 1 deletion AssetEditor/DependencyInjectionContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using Shared.Core.DependencyInjection;
using Shared.Core.DevConfig;
using Shared.Core.ErrorHandling.Exceptions;
using Shared.Core.Events.Global;
using Shared.Core.ToolCreation;
using Shared.Ui.Events.UiCommands;

namespace AssetEditor
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace AssetEditor.Themes.Attached
{
public class WatermarkComboBoxDropDownVisibilityConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
var text = values[0] as string;
var isKeyboardFocusWithin = (bool)values[1];

// Show the watermark if the Text is empty and the control does not have focus
if (string.IsNullOrEmpty(text) && !isKeyboardFocusWithin)
return Visibility.Visible;

// Otherwise, hide the watermark
return Visibility.Collapsed;
}

public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}

}
34 changes: 17 additions & 17 deletions AssetEditor/Themes/ControlColours.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{DynamicResource AColour.Glyph.Static}"/>

<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHover.Background" Color="{DynamicResource AColour.Tone5.Background.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHover.Border" Color="{DynamicResource AColour.Tone5.Border.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelected.Background" Color="{DynamicResource AColour.Tone5.Background.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelected.Border" Color="{DynamicResource AColour.Tone5.Border.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedHover.Background" Color="{DynamicResource AColour.Tone5.Background.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedHover.Border" Color="{DynamicResource AColour.Tone5.Border.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedNoFocus.Background" Color="{DynamicResource AColour.Tone5.Background.Selected.Inactive}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedNoFocus.Border" Color="{DynamicResource AColour.Tone5.Border.Selected.Inactive}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewFocus.Border" Color="{DynamicResource AColour.Tone5.Border.Static}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHoverFocus.Background" Color="{DynamicResource AColour.Tone5.Background.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHoverFocus.Border" Color="{DynamicResource AColour.Tone5.Border.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.Hover.Background" Color="{DynamicResource AColour.Tone5.Background.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.Hover.Border" Color="{DynamicResource AColour.Tone5.Border.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.Selected.Background" Color="{DynamicResource AColour.Tone5.Background.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.Selected.Border" Color="{DynamicResource AColour.Tone5.Border.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.SelectedHover.Background" Color="{DynamicResource AColour.Tone5.Background.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.SelectedHover.Border" Color="{DynamicResource AColour.Tone5.Border.Selected}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.SelectedNoFocus.Background" Color="{DynamicResource AColour.Tone5.Background.Selected.Inactive}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.SelectedNoFocus.Border" Color="{DynamicResource AColour.Tone5.Border.Selected.Inactive}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.Focus.Border" Color="{DynamicResource AColour.Tone5.Border.Static}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.HoverFocus.Background" Color="{DynamicResource AColour.Tone5.Background.MouseOver}"/>
<SolidColorBrush x:Key="ComboBoxItem.ItemsView.HoverFocus.Border" Color="{DynamicResource AColour.Tone5.Border.MouseOver}"/>

<SolidColorBrush x:Key="TextBox.Static.Background" Color="{DynamicResource AColour.Tone6.Background.Static}"/>
<SolidColorBrush x:Key="TextBox.Static.Border" Color="{DynamicResource AColour.Tone6.Border.Static}"/>
Expand Down Expand Up @@ -255,15 +255,15 @@

<SolidColorBrush x:Key="DataGrid.Static.Background" Color="{DynamicResource AColour.Tone4.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.Static.Border" Color="{DynamicResource AColour.Tone4.Border.Static}"/>
<SolidColorBrush x:Key="DataGrid.HorizontalSeparatorBrush" Color="{DynamicResource AColour.Tone7.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.VerticalSeparatorBrush" Color="{DynamicResource AColour.Tone7.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.HeaderItem.Static.Background" Color="{DynamicResource AColour.Tone6.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.HorizontalSeparatorBrush" Color="{DynamicResource AColour.Tone8.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.VerticalSeparatorBrush" Color="{DynamicResource AColour.Tone8.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.HeaderItem.Static.Background" Color="{DynamicResource AColour.Tone7.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.HeaderItem.MouseOver.Background" Color="{DynamicResource AColour.Tone6.Background.MouseOver}"/>
<SolidColorBrush x:Key="DataGrid.HeaderItem.MouseDown.Background" Color="{DynamicResource AColour.Tone6.Background.MouseDown}"/>
<SolidColorBrush x:Key="DataGrid.RowHeader.Static.Background" Color="{DynamicResource AColour.Tone6.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.Row.Selected.Background" Color="{DynamicResource AColour.Tone5.Background.Selected}"/>
<SolidColorBrush x:Key="DataGrid.CellItem.Static.Background" Color="{DynamicResource AColour.Tone5.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.CellItem.MouseOver.Background" Color="{DynamicResource AColour.Tone5.Background.MouseOver}"/>
<SolidColorBrush x:Key="DataGrid.Row.Selected.Background" Color="{DynamicResource AColour.Tone6.Background.Selected}"/>
<SolidColorBrush x:Key="DataGrid.CellItem.Static.Background" Color="{DynamicResource AColour.Tone6.Background.Static}"/>
<SolidColorBrush x:Key="DataGrid.CellItem.MouseOver.Background" Color="{DynamicResource AColour.Tone6.Background.MouseOver}"/>

<SolidColorBrush x:Key="Window.Static.Background" Color="{DynamicResource AColour.Tone3.Background.Static}"/>
<SolidColorBrush x:Key="Window.Static.Border" Color="{DynamicResource AColour.Tone2.Background.Static}"/>
Expand Down
Loading

0 comments on commit 280d294

Please sign in to comment.