Skip to content

Commit

Permalink
Merge pull request #171 from OliBomby/dev
Browse files Browse the repository at this point in the history
Dev update for 1.10.5
  • Loading branch information
OliBomby authored Jan 1, 2022
2 parents 7a3668b + b95d2ee commit bdb962b
Show file tree
Hide file tree
Showing 30 changed files with 238 additions and 204 deletions.
2 changes: 1 addition & 1 deletion Mapping_Tools/Classes/SystemTools/BackupManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static bool SaveMapBackup(string fileToCopy, bool forced = false, string
if (string.IsNullOrEmpty(filename))
filename = Path.GetFileName(fileToCopy);

if (SettingsManager.Settings.UseEditorReader) {
if (SettingsManager.Settings.UseEditorReader && Path.GetExtension(fileToCopy) == ".osu") {
fileToCopy = GetNewestVersionPath(fileToCopy);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
namespace Mapping_Tools.Components.Domain {
internal class MapPathStringAddNewLinesConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
return ((string)value).Replace('|', '\n');
if (value is not string str) return string.Empty;
return str.Replace('|', '\n');
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
return ((string)value).Replace('\n', '|');
if (value is not string str) return string.Empty;
return str.Replace('\n', '|');
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Data;

namespace Mapping_Tools.Components.Domain {
internal class MapPathStringJustFilenameConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
return value is not string str ? string.Empty : string.Join(" | ", str.Split('|').Select(Path.GetFileName));
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
throw new InvalidOperationException("MapPathStringJustFilenameConverter can not convert back values.");
}
}
}
2 changes: 1 addition & 1 deletion Mapping_Tools/Components/ViewHeaderComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
d:DesignWidth="300"
mc:Ignorable="d">
<StackPanel x:Name="MainPanel" Orientation="Horizontal">
<TextBlock x:Name="HeaderTextBlock" Text="Test" FontSize="40" VerticalAlignment="Center" FontWeight="Bold" Margin="0,0,5,0" Foreground="{DynamicResource PrimaryHueMidBrush}"/>
<TextBlock x:Name="HeaderTextBlock" Text="Test" FontSize="32" VerticalAlignment="Center" FontWeight="Bold" Margin="0,0,5,0" Foreground="{DynamicResource PrimaryHueMidBrush}"/>
<materialDesign:PopupBox x:Name="DescriptionIcon" Margin="5">
<materialDesign:PopupBox.ToggleContent>
<materialDesign:PackIcon Kind="HelpCircle" Width="24" Height="24" Foreground="{DynamicResource SecondaryAccentBrush}"/>
Expand Down
349 changes: 179 additions & 170 deletions Mapping_Tools/MainWindow.xaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Mapping_Tools/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private void SetFullscreen(bool fullscreen, bool actuallyChangeFullscreen = true
WindowState = WindowState.Maximized;
}

MasterGrid.Margin = new Thickness(5);
MasterGrid.Margin = new Thickness(7);
window_border.BorderThickness = new Thickness(0);
bt.Content = new PackIcon { Kind = PackIconKind.WindowRestore };
} else {
Expand Down
4 changes: 2 additions & 2 deletions Mapping_Tools/Mapping_Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<AssemblyVersion>1.10.4</AssemblyVersion>
<FileVersion>1.10.4</FileVersion>
<AssemblyVersion>1.10.5</AssemblyVersion>
<FileVersion>1.10.5</FileVersion>
<AssemblyName>Mapping Tools</AssemblyName>
<ApplicationIcon>Data\mt_icon.ico</ApplicationIcon>
<Platforms>AnyCPU;x86;x64</Platforms>
Expand Down
4 changes: 3 additions & 1 deletion Mapping_Tools/Viewmodels/MainWindowVm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public MainWindowVm() {

GenerateNavigationItems();
UpdateNavigationItems();

DrawerOpen = true;
}

public CommandImplementation GoToSelectedPage { get; }
Expand Down Expand Up @@ -294,7 +296,7 @@ public void SetCurrentView(object view) {
}

private void ViewChanged() {
DrawerOpen = false;
//DrawerOpen = false;

var isSavable = View.GetType().GetInterfaces().Any(x =>
x.IsGenericType &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Auto-fail Detector"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private string Run_Program(AutoFailDetectorVm args, BackgroundWorker worker, DoW
private void FillTimeLine() {
_tl?.mainCanvas.Children.Clear();
try {
_tl = new TimeLine(MainWindow.AppWindow.ActualWidth, 100.0, _endTimeMonitor);
_tl = new TimeLine(MainWindow.AppWindow.MainContentGrid.ActualWidth, 100.0, _endTimeMonitor);
foreach (double timingS in _potentialUnloadingObjects) {
_tl.AddElement(timingS, 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Combo Colour Studio"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/HitsoundCopier/HitsoundCopierView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel Grid.Row="0" Margin="0,0,120,0">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Hitsound Copier"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


<StackPanel Orientation="Horizontal" Grid.Row="0">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Hitsound Preview Helper"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/HitsoundStudio/HitsoundStudioView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</Grid.RowDefinitions>
<Grid Name="TitleGrid" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Hitsound Studio"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/MapCleaner/CleanerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Map Cleaner"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/MapCleaner/CleanerView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ on first.Offset equals second.Offset
private void FillTimeLine() {
_tl?.mainCanvas.Children.Clear();
try {
_tl = new TimeLine(MainWindow.AppWindow.ActualWidth, 100.0, _endTimeMonitor);
_tl = new TimeLine(MainWindow.AppWindow.MainContentGrid.ActualWidth, 100.0, _endTimeMonitor);
foreach (double timingS in _timingpointsAdded) {
_tl.AddElement(timingS, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/MapsetMerger/MapsetMergerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Mapset Merger"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Metadata Manager"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/PatternGallery/PatternGalleryView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal" Grid.Row="0">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Pattern Gallery"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/Preferences/PreferencesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</UserControl.Resources>
<Grid>
<StackPanel Margin="0,0,100,0">
<TextBlock Foreground="{DynamicResource PrimaryHueMidBrush}" FontSize="40" FontWeight="Bold"><Run Text="Preferences"/></TextBlock>
<TextBlock Foreground="{DynamicResource PrimaryHueMidBrush}" FontSize="32" FontWeight="Bold"><Run Text="Preferences"/></TextBlock>

<Grid Margin="0,20,0,0">
<Grid.ColumnDefinitions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</Grid.RowDefinitions>
<Grid Name="TitleGrid" Grid.Row="0">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Property Transformer"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/RhythmGuide/RhythmGuideView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel Grid.Row="0" Margin="0,0,120,0">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Rhythm Guide"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Slider Completionator"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/SliderMerger/SliderMergerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Slider Merger"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/Sliderator/SlideratorView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Sliderator"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/SnappingTools/SnappingToolsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Geometry Dashboard"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
14 changes: 9 additions & 5 deletions Mapping_Tools/Views/Standard/StandardView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:domain="clr-namespace:Mapping_Tools.Components.Domain"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<domain:MapPathStringJustFilenameConverter x:Key="MapPathStringJustFilenameConverter" />
</UserControl.Resources>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
Expand All @@ -24,7 +28,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" FontSize="40" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Get started"/></TextBlock>
<TextBlock Grid.Row="0" FontSize="32" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Get started"/></TextBlock>

<ListView HorizontalAlignment="Left" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListViewItem>
Expand Down Expand Up @@ -58,7 +62,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" FontSize="40" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Changelog"/></TextBlock>
<TextBlock Grid.Row="0" FontSize="32" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Changelog"/></TextBlock>
<ListView Grid.Row="1" x:Name="ChangelogList" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemTemplate>
<DataTemplate>
Expand All @@ -78,13 +82,13 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" FontSize="40" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Recent"/></TextBlock>
<TextBlock Grid.Row="0" FontSize="32" Foreground="{DynamicResource PrimaryHueMidBrush}"><Run Text="Recent"/></TextBlock>
<ListView Grid.Row="1" x:Name="recentList" MouseDoubleClick="RecentList_MouseDoubleClick"
ToolTip="Double-click any selection of items to set them as the current beatmap.">
<ListView.View>
<GridView>
<GridViewColumn Header="Path" DisplayMemberBinding="{Binding Path}"/>
<GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date}"/>
<GridViewColumn Header="Path" DisplayMemberBinding="{Binding Path, Converter={StaticResource MapPathStringJustFilenameConverter}, Mode=OneWay}"/>
<GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date, Mode=OneWay}"/>
</GridView>
</ListView.View>
</ListView>
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/TimingCopier/TimingCopierView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel Grid.Row="0" Margin="0,0,120,0">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Timing Copier"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/TimingHelper/TimingHelperView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Timing Helper"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/TimingStudio/TimingStudioView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Grid Name="FirstGrid" Grid.Row="0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="40" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<TextBlock FontSize="32" FontWeight="Bold" Foreground="{DynamicResource PrimaryHueMidBrush}">
<Run Text="Timing Helper"/>
</TextBlock>
<materialDesign:PopupBox Margin="10" VerticalAlignment="Bottom" ToolTip="Click me!">
Expand Down

0 comments on commit bdb962b

Please sign in to comment.