mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Implemented settings flyout (not rigged to actual settings yet)
This commit is contained in:
parent
53b9dd4dbd
commit
49d74a54ad
@ -33,7 +33,7 @@
|
|||||||
FontFamily="Segoe UI Semibold" Foreground="#535353" Height="79" Margin="0,10,0,0">
|
FontFamily="Segoe UI Semibold" Foreground="#535353" Height="79" Margin="0,10,0,0">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap"
|
||||||
Text="Note: Requires patch 1.12. When a new patch is released Artemis will automatically be adjusted for the latest version."
|
Text="Note: Requires patch 1.12. When a new patch is released Artemis download new pointers for the latest version (unless disabled in settings)."
|
||||||
FontStyle="Italic" FontSize="12" />
|
FontStyle="Italic" FontSize="12" />
|
||||||
|
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
|
|
||||||
namespace Artemis.ViewModels.Flyouts
|
namespace Artemis.ViewModels.Flyouts
|
||||||
@ -9,5 +10,10 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
Header = "settings";
|
Header = "settings";
|
||||||
Position = Position.Right;
|
Position = Position.Right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void NavigateTo(string url)
|
||||||
|
{
|
||||||
|
Process.Start(new ProcessStartInfo(url));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,8 +4,10 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
|
Width="300">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
@ -16,14 +18,60 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0"
|
<!-- Startup with Windows -->
|
||||||
Grid.Column="0"
|
<Label Grid.Row="0" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Margin="5"
|
Content="Startup with Windows:" />
|
||||||
VerticalAlignment="Center"
|
<controls:ToggleSwitch Grid.Row="0" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120" />
|
||||||
|
|
||||||
|
<!-- Keyboard selection -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
|
Content="Keyboard:" />
|
||||||
|
<ComboBox Grid.Row="1" Grid.Column="1" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||||
|
Width="120" />
|
||||||
|
|
||||||
|
<!-- Gamestate port -->
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Content="Gamestate server port:" />
|
Content="Gamestate server port:" />
|
||||||
|
<controls:NumericUpDown Grid.Row="2" Grid.Column="1" Margin="10" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right" Width="120" />
|
||||||
|
|
||||||
|
<!-- Update pointers -->
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
|
Content="Download pointers:" />
|
||||||
|
<controls:ToggleSwitch Grid.Row="3" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120" />
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<Button Grid.Row="4" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Left" Width="120"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
<Button Grid.Row="4" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
|
||||||
|
<!-- Version -->
|
||||||
|
<Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Row ="0" Grid.Column="0" Text="Artemis pre-release" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
<Button Grid.Row ="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
|
||||||
|
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
|
||||||
|
Content="View on GitHub" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -28,7 +28,12 @@
|
|||||||
</Controls:MetroWindow.RightWindowCommands>
|
</Controls:MetroWindow.RightWindowCommands>
|
||||||
|
|
||||||
<Controls:MetroWindow.Flyouts>
|
<Controls:MetroWindow.Flyouts>
|
||||||
<Controls:FlyoutsControl ItemsSource="{Binding Path=Flyouts}">
|
<Controls:FlyoutsControl ItemsSource="{Binding Flyouts}">
|
||||||
|
<Controls:FlyoutsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ContentControl cal:View.Model="{Binding}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</Controls:FlyoutsControl.ItemTemplate>
|
||||||
<Controls:FlyoutsControl.ItemContainerStyle>
|
<Controls:FlyoutsControl.ItemContainerStyle>
|
||||||
<Style BasedOn="{StaticResource {x:Type Controls:Flyout}}" TargetType="{x:Type Controls:Flyout}">
|
<Style BasedOn="{StaticResource {x:Type Controls:Flyout}}" TargetType="{x:Type Controls:Flyout}">
|
||||||
<Setter Property="Header" Value="{Binding Header}" />
|
<Setter Property="Header" Value="{Binding Header}" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user