mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-02 10:43:31 +00:00
Added window resize support to the profile editor
Fixed UI alignments in profile editor
This commit is contained in:
parent
ef19348e53
commit
809e38da7e
@ -93,7 +93,7 @@ namespace Artemis.InjectionModules
|
||||
Kernel.Bind(x =>
|
||||
x.FromThisAssembly()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<LayerCondition>()
|
||||
.InheritedFrom<ILayerCondition>()
|
||||
.BindAllInterfaces());
|
||||
Kernel.Bind(x =>
|
||||
x.FromThisAssembly()
|
||||
|
||||
@ -23,10 +23,10 @@ namespace Artemis.Models
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public MouseButtons MouseButtons { get; }
|
||||
public HotKey HotKey { get; set; }
|
||||
public Action Action { get; set; }
|
||||
public MouseButtons MouseButtons { get; }
|
||||
public KeyType KeyType { get; set; }
|
||||
public Action Action { get; set; }
|
||||
|
||||
public void InvokeIfMatched(HotKey hotKey, KeyType keyType)
|
||||
{
|
||||
|
||||
@ -4,67 +4,48 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
d:DesignHeight="600" d:DesignWidth="900">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Assetto Corsa module uses the
|
||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
||||
NavigateUri="https://github.com/mdjarv/assettocorsasharedmemory">
|
||||
Assetto Corsa Shared Memory Library
|
||||
</Hyperlink>
|
||||
project by mdjarv
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Assetto Corsa module uses the <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/mdjarv/assettocorsasharedmemory">Assetto Corsa Shared Memory Library</Hyperlink> project by mdjarv.
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,64 +4,53 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset" />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
|
||||
<!-- Directory -->
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Counter-Strike Global Offensive directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="0,0,30,0" Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Artemis.Managers;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Modules.Abstract;
|
||||
using Ninject;
|
||||
|
||||
@ -6,8 +7,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
||||
{
|
||||
public sealed class CounterStrikeViewModel : ModuleViewModel
|
||||
{
|
||||
public CounterStrikeViewModel(MainManager mainManager,
|
||||
[Named(nameof(CounterStrikeModel))] ModuleModel moduleModel, IKernel kernel)
|
||||
public CounterStrikeViewModel(MainManager mainManager, [Named(nameof(CounterStrikeModel))] ModuleModel moduleModel, IKernel kernel)
|
||||
: base(mainManager, moduleModel, kernel)
|
||||
{
|
||||
DisplayName = "CS:GO";
|
||||
@ -15,10 +15,23 @@ namespace Artemis.Modules.Games.CounterStrike
|
||||
|
||||
public override bool UsesProfileEditor => true;
|
||||
|
||||
public void BrowseDirectory()
|
||||
public void PlaceConfigFile()
|
||||
{
|
||||
((CounterStrikeModel) ModuleModel).PlaceConfigFile();
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
|
||||
public void BrowseDirectory()
|
||||
{
|
||||
var dialog = new FolderBrowserDialog { SelectedPath = ((CounterStrikeSettings)Settings).GameDirectory };
|
||||
var result = dialog.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
((CounterStrikeSettings)Settings).GameDirectory = dialog.SelectedPath;
|
||||
((CounterStrikeModel)ModuleModel).PlaceConfigFile();
|
||||
Settings.Save();
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,63 +4,53 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows mana, HP, character state on the keyboard and colors headset and mouse according to HP" />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows mana, HP, character state on the keyboard and colors headset and mouse according to HP." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<!-- Directory -->
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Dota 2 directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="0,0,30,0" Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action PlaceConfigFile]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Artemis.Managers;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Modules.Abstract;
|
||||
using Ninject;
|
||||
|
||||
@ -6,18 +7,31 @@ namespace Artemis.Modules.Games.Dota2
|
||||
{
|
||||
public sealed class Dota2ViewModel : ModuleViewModel
|
||||
{
|
||||
public Dota2ViewModel(MainManager mainManager, [Named(nameof(Dota2Model))] ModuleModel moduleModel,
|
||||
IKernel kernel) : base(mainManager, moduleModel, kernel)
|
||||
public Dota2ViewModel(MainManager mainManager, [Named(nameof(Dota2Model))] ModuleModel moduleModel, IKernel kernel)
|
||||
: base(mainManager, moduleModel, kernel)
|
||||
{
|
||||
DisplayName = "Dota 2";
|
||||
}
|
||||
|
||||
public override bool UsesProfileEditor => true;
|
||||
|
||||
public void BrowseDirectory()
|
||||
public void PlaceConfigFile()
|
||||
{
|
||||
((Dota2Model) ModuleModel).PlaceConfigFile();
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
|
||||
public void BrowseDirectory()
|
||||
{
|
||||
var dialog = new FolderBrowserDialog { SelectedPath = ((Dota2Settings)Settings).GameDirectory };
|
||||
var result = dialog.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
((Dota2Settings)Settings).GameDirectory = dialog.SelectedPath;
|
||||
((Dota2Model)ModuleModel).PlaceConfigFile();
|
||||
Settings.Save();
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,59 +4,43 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows indicator lights, speed and engine RPM on the keyboard" />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows indicator lights, speed and engine RPM on the keyboard." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Truck Simulator module uses code from the
|
||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
||||
NavigateUri="https://github.com/Funbit/ets2-telemetry-server">
|
||||
ETS2 Telemetry Web Server
|
||||
</Hyperlink>
|
||||
project by Funbit
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Truck Simulator module uses code from the <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/Funbit/ets2-telemetry-server">ETS2 Telemetry Web Server</Hyperlink> project by Funbit.
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Directories -->
|
||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
|
||||
<!-- ETS2 dir -->
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -66,37 +50,27 @@
|
||||
<StackPanel Margin="0,0,1,0" Grid.Column="0">
|
||||
<Label FontSize="16" HorizontalAlignment="Left" Content="Euro Truck Simulator 2 directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="Ets2GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=Settings.Ets2GameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action Ets2PlacePlugin]" />
|
||||
<Button x:Name="Ets2BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="Ets2GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0" Text="{Binding Path=Settings.Ets2GameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action Ets2PlacePlugin]" />
|
||||
<Button x:Name="Ets2BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!-- ATS dir -->
|
||||
<StackPanel Margin="0,0,1,0" Grid.Column="1">
|
||||
<Label FontSize="16" HorizontalAlignment="Left" Content="American Truck Simulator directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="AtsGameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=Settings.AtsGameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action AtsPlacePlugin]" />
|
||||
<Button x:Name="AtsBrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="AtsGameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0" Text="{Binding Path=Settings.AtsGameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action AtsPlacePlugin]" />
|
||||
<Button x:Name="AtsBrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,51 +4,43 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default fills up the keyboard and colors all devices according to the character you're playing/team you're in." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default fills up the keyboard and colors all devices according to the character you're playing/team you're in." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,57 +4,43 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="Mirrors Light FX lighting to your RGB devices" />
|
||||
<AccessText TextWrapping="Wrap" Text="Mirrors Light FX lighting to your RGB devices." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,85 +4,59 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="410.933" d:DesignWidth="732.154">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default colors the keyboard according to the chosen hero and shows ability cooldowns." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default colors the keyboard according to the chosen hero and shows ability cooldowns." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,10">
|
||||
Note: If you're having trouble getting the profile to work, check out
|
||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
||||
NavigateUri="https://github.com/SpoinkyNL/Artemis/wiki/Overwatch">
|
||||
the wiki
|
||||
</Hyperlink>
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
Note: If you're having trouble getting the profile to work, check out <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/SpoinkyNL/Artemis/wiki/Overwatch">the wiki</Hyperlink>.
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Game directory -->
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Overwatch Directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=GameSettings.GameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceDll]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="0,0,30,0" Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action PlaceDll]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor"
|
||||
Margin="0,0,-30,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@ -15,6 +15,11 @@ namespace Artemis.Modules.Games.Overwatch
|
||||
|
||||
public override bool UsesProfileEditor => true;
|
||||
|
||||
public void PlaceDll()
|
||||
{
|
||||
((OverwatchModel)ModuleModel).PlaceDll();
|
||||
}
|
||||
|
||||
public void BrowseDirectory()
|
||||
{
|
||||
var dialog = new FolderBrowserDialog {SelectedPath = ((OverwatchSettings) Settings).GameDirectory};
|
||||
|
||||
@ -9,10 +9,13 @@ namespace Artemis.Modules.Games.ProjectCars.Data
|
||||
{
|
||||
public pCarsDataClass MapStructToClass(pCarsAPIStruct pcarsDataStruct, pCarsDataClass pCarsData)
|
||||
{
|
||||
//pCarsDataClass pCarsData = new pCarsDataClass();
|
||||
pCarsData.mVersion = pcarsDataStruct.mVersion;
|
||||
pCarsData.mBuildVersion = pcarsDataStruct.mBuildVersion;
|
||||
|
||||
// The game isn't running if these are 0
|
||||
if (pcarsDataStruct.mVersion == 0 && pcarsDataStruct.mBuildVersion == 0)
|
||||
return pCarsData;
|
||||
|
||||
// Session type
|
||||
pCarsData.mGameState = (eGameState) pcarsDataStruct.mGameState;
|
||||
pCarsData.mSessionState = (eSessionState) pcarsDataStruct.mSessionState;
|
||||
|
||||
@ -37,6 +37,10 @@ namespace Artemis.Modules.Games.ProjectCars.Data
|
||||
if (memoryMappedFile == null)
|
||||
InitialiseSharedMemory();
|
||||
|
||||
// If it's still null here the game isn't running
|
||||
if (memoryMappedFile == null)
|
||||
return new Tuple<bool, pCarsAPIStruct>(true, _pcarsapistruct);
|
||||
|
||||
using (var sharedMemoryStreamView = memoryMappedFile.CreateViewStream())
|
||||
{
|
||||
var sharedMemoryStream = new BinaryReader(sharedMemoryStreamView);
|
||||
|
||||
@ -4,67 +4,48 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15,5,5,5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Project CARS module uses code from the
|
||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
||||
NavigateUri="https://bitbucket.org/MikeyTT/pcars-api-demo">
|
||||
pCars API Demo
|
||||
</Hyperlink>
|
||||
project by MikeyTT
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
The Project CARS module uses code from the <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://bitbucket.org/MikeyTT/pcars-api-demo">pCars API Demo</Hyperlink> project by MikeyTT.
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,53 +4,46 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default fills up the keyboard and colors all devices according to the amount boost." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default fills up the keyboard and colors all devices according to the amount boost." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Sub header -->
|
||||
<TextBlock x:Name="VersionText" Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10"/>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
|
||||
<TextBlock x:Name="VersionText" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center"
|
||||
Margin="0,8" TextWrapping="Wrap" HorizontalAlignment="Left"
|
||||
Foreground="{DynamicResource HighlightBrush}" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -36,15 +36,13 @@ namespace Artemis.Modules.Games.RocketLeague
|
||||
{
|
||||
if (!SettingsProvider.Load<GeneralSettings>().EnablePointersUpdate)
|
||||
{
|
||||
VersionText = "Note: You disabled pointer updates, this could result in the " +
|
||||
"Rocket League effect not working after a game update.";
|
||||
VersionText = "You disabled pointer updates, this could result in the Rocket League effect not working after a game update.";
|
||||
return;
|
||||
}
|
||||
|
||||
Updater.GetPointers();
|
||||
var version = SettingsProvider.Load<OffsetSettings>().RocketLeague.GameVersion;
|
||||
VersionText = $"Note: Requires patch {version}. When a new patch is released Artemis downloads " +
|
||||
"new pointers for the latest version (unless disabled in settings).";
|
||||
VersionText = $"Requires patch {version}. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings).";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,56 +5,48 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.Modules.Games.TheDivision"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="416.495" d:DesignWidth="553.608">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid Margin="15, 5, 5, 5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="Shows verious game states and events on the keyboard. (BETA, uses much CPU!)" />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,0">
|
||||
For this game to work with Artemis, please open up your Division settings, navigate to 3rd Party
|
||||
and set LED keyboard support to Yes. (This only works if you have Artemis running before starting the game)
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
For this game to work with Artemis, please open up your Division settings, navigate to 3rd Party and set LED keyboard support to Yes. (This only works if you have Artemis running before starting the game)
|
||||
</TextBlock>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -8,62 +8,50 @@
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows team, HP armor and ammo on the keyboard and shows team colors on mouse and headset." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows team, HP armor and ammo on the keyboard and shows team colors on mouse and headset." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Game directory -->
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
|
||||
<!-- Directory -->
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Unreal Tournament Directory" />
|
||||
<Grid>
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceFiles]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
||||
HorizontalAlignment="Right" Width="25"
|
||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="0,0,30,0" Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}" cal:Message.Attach="[Event LostFocus] = [Action PlaceFiles]" />
|
||||
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -32,6 +32,13 @@ namespace Artemis.Modules.Games.UnrealTournament
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
|
||||
public void PlaceFiles()
|
||||
{
|
||||
((UnrealTournamentModel)ModuleModel).PlaceFiles();
|
||||
Settings.Save();
|
||||
NotifyOfPropertyChange(() => Settings);
|
||||
}
|
||||
|
||||
// Installing GIF on editor open to make sure the proper profiles are loaded
|
||||
private void InstallGif()
|
||||
{
|
||||
|
||||
@ -4,12 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="386.842" d:DesignWidth="554.887">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid Margin="15, 5, 5, 5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@ -17,43 +18,39 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default colors the keyboard according to the sign Gerald is using." />
|
||||
<AccessText TextWrapping="Wrap" Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||
TextAlignment="Justify" Margin="5,0,0,10">
|
||||
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
Artemis requires the latest Witcher 3 version and mod to be installed in order to work. If you don't use any (conflicting) Witcher 3 mods, the mod can automatically be installed.
|
||||
</TextBlock>
|
||||
<Button Grid.Row="2" Grid.Column="0" Margin="5,0,0,0" x:Name="AutoInstall"
|
||||
Content="Try automatic mod install" Width="160" Style="{DynamicResource SquareButtonStyle}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Mod installation -->
|
||||
<Button Grid.Row="2" Grid.Column="0" Margin="5,0,0,0" x:Name="AutoInstall" Content="Try automatic mod install" Width="160" Style="{DynamicResource SquareButtonStyle}" HorizontalAlignment="Left" />
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -8,49 +8,45 @@
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="Fight The Burning Legion in style with reactive lighting" />
|
||||
<AccessText TextWrapping="Wrap" Text="Fight the Legion in style with reactive lighting." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Sub header -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||
This module hasn't been approved by Blizzard and could lead to an account ban. Even though the risk is minimal, it's still your own risk.
|
||||
</TextBlock>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,50 +4,43 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap" Text="Allows you to create layers shown while not gaming" />
|
||||
<AccessText TextWrapping="Wrap" Text="Allows you to create layers outside the supported games." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,-30,0" x:Name="ProfileEditor"/>
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset module" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -4,50 +4,43 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<Grid Margin="15, 5, 15, 5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
|
||||
<!-- Header -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap" Text="Allows you to create layers on top of any other active module." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Enable -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Profile editor -->
|
||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,-30,0" x:Name="ProfileEditor"/>
|
||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset module" VerticalAlignment="Top" Width="100"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Style="{DynamicResource SquareButtonStyle}" />
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
@ -1,39 +1,10 @@
|
||||
using Artemis.Modules.Abstract;
|
||||
using Artemis.Profiles.Layers.Models;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Artemis.Profiles.Layers.Abstract
|
||||
{
|
||||
public abstract class LayerCondition
|
||||
public interface ILayerCondition
|
||||
{
|
||||
[JsonIgnore]
|
||||
public bool HotKeyMet { get; set; }
|
||||
|
||||
public abstract bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel);
|
||||
|
||||
|
||||
public void KeyDownTask(LayerConditionModel condition)
|
||||
{
|
||||
switch (condition.Field)
|
||||
{
|
||||
case "hotkeyEnable":
|
||||
HotKeyMet = true;
|
||||
break;
|
||||
case "hotkeyDisable":
|
||||
HotKeyMet = false;
|
||||
break;
|
||||
case "hotkeyToggle":
|
||||
HotKeyMet = !HotKeyMet;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void KeyUpTask(LayerConditionModel condition)
|
||||
{
|
||||
if (condition.Field == "hotkeyEnable")
|
||||
HotKeyMet = false;
|
||||
else
|
||||
HotKeyMet = true;
|
||||
}
|
||||
bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel);
|
||||
}
|
||||
}
|
||||
@ -1,42 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Artemis.Modules.Abstract;
|
||||
using Artemis.Profiles.Layers.Abstract;
|
||||
using Artemis.Profiles.Layers.Models;
|
||||
|
||||
namespace Artemis.Profiles.Layers.Conditions
|
||||
{
|
||||
public class DataModelCondition : LayerCondition
|
||||
public class DataModelCondition : ILayerCondition
|
||||
{
|
||||
public override bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel)
|
||||
public bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel)
|
||||
{
|
||||
lock (layerModel.Properties.Conditions)
|
||||
{
|
||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null && !c.Field.Contains("hotkey")).ToList();
|
||||
|
||||
if (checkConditions.Count == layerModel.Properties.Conditions.Count)
|
||||
return SimpleConditionsMet(layerModel, dataModel, checkConditions);
|
||||
|
||||
var conditionMet = false;
|
||||
switch (layerModel.Properties.ConditionType)
|
||||
{
|
||||
case ConditionType.AnyMet:
|
||||
conditionMet = HotKeyMet || checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
case ConditionType.AllMet:
|
||||
conditionMet = HotKeyMet && checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
case ConditionType.NoneMet:
|
||||
conditionMet = !HotKeyMet && !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
}
|
||||
|
||||
return conditionMet;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool SimpleConditionsMet(LayerModel layerModel, ModuleDataModel dataModel, IEnumerable<LayerConditionModel> checkConditions)
|
||||
{
|
||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null).ToList();
|
||||
switch (layerModel.Properties.ConditionType)
|
||||
{
|
||||
case ConditionType.AnyMet:
|
||||
@ -45,7 +20,7 @@ namespace Artemis.Profiles.Layers.Conditions
|
||||
return checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||
case ConditionType.NoneMet:
|
||||
return !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
default:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,33 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Artemis.Modules.Abstract;
|
||||
using Artemis.Profiles.Layers.Abstract;
|
||||
using Artemis.Profiles.Layers.Models;
|
||||
|
||||
namespace Artemis.Profiles.Layers.Conditions
|
||||
{
|
||||
public class EventCondition : LayerCondition
|
||||
public class EventCondition : ILayerCondition
|
||||
{
|
||||
public override bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel)
|
||||
public bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel)
|
||||
{
|
||||
lock (layerModel.Properties.Conditions)
|
||||
{
|
||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null && !c.Field.Contains("hotkey")).ToList();
|
||||
|
||||
if (checkConditions.Count == layerModel.Properties.Conditions.Count)
|
||||
return SimpleConditionsMet(layerModel, dataModel, checkConditions);
|
||||
|
||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null).ToList();
|
||||
var conditionsMet = false;
|
||||
switch (layerModel.Properties.ConditionType)
|
||||
{
|
||||
case ConditionType.AnyMet:
|
||||
conditionsMet = HotKeyMet || checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
conditionsMet = checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
case ConditionType.AllMet:
|
||||
conditionsMet = HotKeyMet && checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||
conditionsMet = checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
case ConditionType.NoneMet:
|
||||
conditionsMet = !HotKeyMet && !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
conditionsMet = !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -35,27 +30,9 @@ namespace Artemis.Profiles.Layers.Conditions
|
||||
|
||||
if (conditionsMet)
|
||||
layerModel.EventProperties.TriggerEvent(layerModel);
|
||||
if (layerModel.EventProperties.MustStop(layerModel))
|
||||
HotKeyMet = false;
|
||||
|
||||
return layerModel.EventProperties.MustDraw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static bool SimpleConditionsMet(LayerModel layerModel, ModuleDataModel dataModel, IEnumerable<LayerConditionModel> checkConditions)
|
||||
{
|
||||
switch (layerModel.Properties.ConditionType)
|
||||
{
|
||||
case ConditionType.AnyMet:
|
||||
return checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
case ConditionType.AllMet:
|
||||
return checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||
case ConditionType.NoneMet:
|
||||
return !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ namespace Artemis.Profiles.Layers.Models
|
||||
#region Layer type properties
|
||||
|
||||
public ILayerType LayerType { get; set; }
|
||||
public LayerCondition LayerCondition { get; set; }
|
||||
public ILayerCondition LayerCondition { get; set; }
|
||||
public ILayerAnimation LayerAnimation { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -223,45 +223,45 @@ namespace Artemis.Profiles
|
||||
|
||||
public void ApplyKeybinds()
|
||||
{
|
||||
_profileBinds.Clear();
|
||||
foreach (var layerModel in GetLayers())
|
||||
{
|
||||
for (var index = 0; index < layerModel.Properties.Conditions.Count; index++)
|
||||
{
|
||||
var condition = layerModel.Properties.Conditions[index];
|
||||
if (condition.Field == null || !condition.Field.Contains("hotkey"))
|
||||
continue;
|
||||
|
||||
// Create an action for the layer, the layer's specific condition type handles activation
|
||||
if (condition.Operator == "held")
|
||||
{
|
||||
var downAction = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||
var downKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-down-{index}", condition.HotKey, KeyType.KeyDown, downAction);
|
||||
var upAction = new Action(() => layerModel.LayerCondition.KeyUpTask(condition));
|
||||
var upKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-up-{index}", condition.HotKey, KeyType.KeyUp, upAction);
|
||||
|
||||
KeybindManager.AddOrUpdate(downKb);
|
||||
KeybindManager.AddOrUpdate(upKb);
|
||||
_profileBinds.Add(downKb);
|
||||
_profileBinds.Add(upKb);
|
||||
}
|
||||
else
|
||||
{
|
||||
var action = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||
var kb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-{index}", condition.HotKey, KeyType.KeyDown, action);
|
||||
|
||||
KeybindManager.AddOrUpdate(kb);
|
||||
_profileBinds.Add(kb);
|
||||
}
|
||||
}
|
||||
}
|
||||
// _profileBinds.Clear();
|
||||
// foreach (var layerModel in GetLayers())
|
||||
// {
|
||||
// for (var index = 0; index < layerModel.Properties.Conditions.Count; index++)
|
||||
// {
|
||||
// var condition = layerModel.Properties.Conditions[index];
|
||||
// if (condition.Field == null || !condition.Field.Contains("hotkey"))
|
||||
// continue;
|
||||
//
|
||||
// // Create an action for the layer, the layer's specific condition type handles activation
|
||||
// if (condition.Operator == "held")
|
||||
// {
|
||||
// var downAction = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||
// var downKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-down-{index}", condition.HotKey, KeyType.KeyDown, downAction);
|
||||
// var upAction = new Action(() => layerModel.LayerCondition.KeyUpTask(condition));
|
||||
// var upKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-up-{index}", condition.HotKey, KeyType.KeyUp, upAction);
|
||||
//
|
||||
// KeybindManager.AddOrUpdate(downKb);
|
||||
// KeybindManager.AddOrUpdate(upKb);
|
||||
// _profileBinds.Add(downKb);
|
||||
// _profileBinds.Add(upKb);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var action = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||
// var kb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-{index}", condition.HotKey, KeyType.KeyDown, action);
|
||||
//
|
||||
// KeybindManager.AddOrUpdate(kb);
|
||||
// _profileBinds.Add(kb);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public void ClearKeybinds()
|
||||
{
|
||||
foreach (var keybindModel in _profileBinds)
|
||||
KeybindManager.Remove(keybindModel);
|
||||
_profileBinds.Clear();
|
||||
// foreach (var keybindModel in _profileBinds)
|
||||
// KeybindManager.Remove(keybindModel);
|
||||
// _profileBinds.Clear();
|
||||
}
|
||||
|
||||
#region Compare
|
||||
|
||||
@ -147,7 +147,11 @@ namespace Artemis.ViewModels
|
||||
|
||||
private void ActivateViews()
|
||||
{
|
||||
var vms = _kernel.GetAll<BaseViewModel>().ToList();
|
||||
var vms = _kernel.GetAll<BaseViewModel>()
|
||||
.OrderBy(v => v.DisplayName != "Welcome")
|
||||
.ThenBy(v => v.DisplayName)
|
||||
.ToList();
|
||||
|
||||
Items.Clear();
|
||||
Items.AddRange(vms);
|
||||
ActivateItem(vms.FirstOrDefault());
|
||||
|
||||
@ -3,10 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<TabControl Margin="0,10" x:Name="Items" controls:TabControlHelper.IsUnderlined="True">
|
||||
<TabControl x:Name="Items" TabStripPlacement="Left">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
<TabControl Margin="0,10" x:Name="Items" controls:TabControlHelper.IsUnderlined="True">
|
||||
<TabControl x:Name="Items" TabStripPlacement="Left">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
@ -3,11 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.Views"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<TabControl Margin="0,10" x:Name="Items" controls:TabControlHelper.IsUnderlined="True">
|
||||
<TabControl x:Name="Items" TabStripPlacement="Left">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
@ -8,57 +8,34 @@
|
||||
xmlns:itemBehaviours="clr-namespace:Artemis.ItemBehaviours"
|
||||
xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
|
||||
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
|
||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="510" Width="1055">
|
||||
d:DesignHeight="400" d:DesignWidth="1060">
|
||||
<UserControl.Resources>
|
||||
<converters:LayerOrderConverter x:Key="LayerOrderConverter" />
|
||||
<Storyboard x:Key="Pulse" RepeatBehavior="Forever">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="BlurRadius" Storyboard.TargetName="ShadowEffect">
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0" Value="25" />
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="10" />
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:4" Value="25" />
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</UserControl.Resources>
|
||||
<UserControl.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Pulse}" />
|
||||
</EventTrigger>
|
||||
</UserControl.Triggers>
|
||||
<Grid Width="Auto" Height="Auto">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="245" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="60" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Preview Background="#FF232323" -->
|
||||
<!-- Preview -->
|
||||
<Label Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Left" Content="Preview" />
|
||||
<Border Grid.Column="0" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}"
|
||||
BorderThickness="3" Width="800" Height="400">
|
||||
<Border>
|
||||
<Border Grid.Column="0" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="3">
|
||||
<Border Padding="50">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect x:Name="ShadowEffect" ShadowDepth="0" Color="{DynamicResource HighlightColor}"
|
||||
Opacity="1" />
|
||||
<DropShadowEffect x:Name="ShadowEffect" ShadowDepth="0" Color="{DynamicResource HighlightColor}" Opacity="1" BlurRadius="25" />
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardImage}"
|
||||
Margin="50" />
|
||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardPreview}"
|
||||
Opacity="0.8"
|
||||
Width="{Binding Path=PreviewSettings.Width}"
|
||||
Height="{Binding Path=PreviewSettings.Height}"
|
||||
Margin="{Binding Path=PreviewSettings.Margin}"
|
||||
Stretch="Fill" Cursor="{Binding Path=KeyboardPreviewCursor}"
|
||||
cal:Message.Attach="[Event MouseMove] = [Action MouseMoveKeyboardPreview($eventArgs)];
|
||||
[Event MouseDown] = [Action MouseDownKeyboardPreview($eventArgs)];
|
||||
[Event MouseUp] = [Action MouseUpKeyboardPreview($eventArgs)]"
|
||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}" />
|
||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardImage}" MinHeight="10" MinWidth="10" Stretch="Uniform" />
|
||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardPreview}" Opacity="0.8" Stretch="Uniform" Cursor="{Binding Path=KeyboardPreviewCursor}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event MouseMove] = [Action MouseMoveKeyboardPreview($eventArgs)]; [Event MouseDown] = [Action MouseDownKeyboardPreview($eventArgs)]; [Event MouseUp] = [Action MouseUpKeyboardPreview($eventArgs)]" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
@ -70,9 +47,7 @@
|
||||
<Button x:Name="AddProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Add profile">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -83,36 +58,26 @@
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Rename profile"
|
||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
</Rectangle>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button x:Name="DuplicateProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0"
|
||||
ToolTip="Duplicate profile"
|
||||
IsEnabled="{Binding Path=ProfileSelected, Mode=OneWay}">
|
||||
<Button x:Name="DuplicateProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}" Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0"
|
||||
ToolTip="Duplicate profile" IsEnabled="{Binding Path=ProfileSelected, Mode=OneWay}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
</Rectangle>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button x:Name="DeleteProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete profile"
|
||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
||||
<Button x:Name="DeleteProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}" Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete profile" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -120,8 +85,7 @@
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock VerticalAlignment="Top" Foreground="{DynamicResource HighlightBrush}" HorizontalAlignment="Left"
|
||||
Margin="5,5,0,0" Text="Note: To edit a default profile, duplicate it first." FontWeight="Bold" />
|
||||
<TextBlock VerticalAlignment="Top" Foreground="{DynamicResource HighlightBrush}" HorizontalAlignment="Left" Margin="5,5,0,0" Text="Note: To edit a default profile, duplicate it first." FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Margin="0,5,0,0" HorizontalAlignment="Right">
|
||||
@ -174,40 +138,34 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- Layer list -->
|
||||
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
|
||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" />
|
||||
<Label HorizontalAlignment="Right" ToolTip="Show all layers instead of just the one you have selected"
|
||||
Content="Show all" Margin="88,0,0,0" VerticalAlignment="Center" />
|
||||
<ToggleButton x:Name="ShowAll" ToolTip="Show all layers instead of just the one you have selected"
|
||||
Margin="0 3 0 0" Width="25" Height="25"
|
||||
IsChecked="{Binding Path=ShowAll, Mode=TwoWay}"
|
||||
Style="{DynamicResource MetroCircleToggleButtonStyle}" HorizontalAlignment="Right" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" VerticalAlignment="Center" />
|
||||
<Label Grid.Column="1" Content="Show all layers" HorizontalAlignment="Right" VerticalAlignment="Center" />
|
||||
<controls:ToggleSwitchButton Grid.Column="2" IsChecked="{Binding Path=ShowAll, Mode=TwoWay}" HorizontalAlignment="Right"
|
||||
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Show all layers instead of just the one you have selected" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}"
|
||||
BorderThickness="3" Margin="10,0,0,0" Height="400" Width="233">
|
||||
<TreeView x:Name="ProfileTree"
|
||||
dragDrop:DragDrop.IsDragSource="True"
|
||||
dragDrop:DragDrop.IsDropTarget="True"
|
||||
dragDrop:DragDrop.DropHandler="{Binding}"
|
||||
ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}"
|
||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="3" Margin="5,0,-5,0" Width="235">
|
||||
<TreeView x:Name="ProfileTree" dragDrop:DragDrop.IsDragSource="True" dragDrop:DragDrop.IsDropTarget="True" dragDrop:DragDrop.DropHandler="{Binding}"
|
||||
ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||
cal:Message.Attach="[Event MouseDoubleClick] = [Action EditLayerFromDoubleClick]">
|
||||
<i:Interaction.Behaviors>
|
||||
<itemBehaviours:BindableSelectedItemBehavior
|
||||
SelectedItem="{Binding SelectedLayer, Mode=TwoWay}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<TreeView.Resources>
|
||||
<ResourceDictionary
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate
|
||||
ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, ElementName=ProfileTree}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu
|
||||
cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||
<ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||
<MenuItem Header="Rename" cal:Message.Attach="RenameLayer($datacontext)" />
|
||||
<MenuItem Header="Duplicate" cal:Message.Attach="CloneLayer($datacontext)" />
|
||||
<MenuItem Header="Delete" cal:Message.Attach="RemoveLayer($datacontext)" />
|
||||
@ -227,14 +185,12 @@
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Margin="10,5,0,0" HorizontalAlignment="Right">
|
||||
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Margin="0,5,0,0" HorizontalAlignment="Right">
|
||||
<Button x:Name="AddLayer" VerticalAlignment="Top"
|
||||
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||
Width="26" Height="26" ToolTip="Add layer" HorizontalAlignment="Left">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -245,9 +201,7 @@
|
||||
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||
Width="26" Height="26" ToolTip="Add folder" HorizontalAlignment="Left" Margin="10,0,0,0">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_folder}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -258,9 +212,7 @@
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Edit layer"
|
||||
IsEnabled="{Binding Path=LayerSelected}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -271,9 +223,7 @@
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Duplicate layer"
|
||||
IsEnabled="{Binding Path=LayerSelected}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
@ -284,9 +234,7 @@
|
||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete layer"
|
||||
IsEnabled="{Binding Path=LayerSelected}">
|
||||
<Button.Content>
|
||||
<Rectangle
|
||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
||||
Width="12" Height="12">
|
||||
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||
<Rectangle.OpacityMask>
|
||||
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
||||
</Rectangle.OpacityMask>
|
||||
|
||||
@ -9,11 +9,8 @@
|
||||
xmlns:viewModels="clr-namespace:Artemis.ViewModels"
|
||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
||||
dialogs:DialogParticipation.Register="{Binding RelativeSource={RelativeSource Self}, Path=DataContext}"
|
||||
mc:Ignorable="d"
|
||||
Title="Artemis" Height="800" Width="1210"
|
||||
MinHeight="800" MinWidth="1210"
|
||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico"
|
||||
d:DataContext="{d:DesignInstance viewModels:ShellViewModel}">
|
||||
mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:ShellViewModel}"
|
||||
Title="Artemis" Height="800" Width="1210" MinHeight="600" MinWidth="600" GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico">
|
||||
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
||||
<Controls:MetroWindow.Resources>
|
||||
<DrawingImage x:Key="BowIcon">
|
||||
@ -116,11 +113,10 @@
|
||||
<ResourceDictionary
|
||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
||||
</Grid.Resources>
|
||||
<TabControl Margin="0,10,10,10" TabStripPlacement="Left" x:Name="Items"
|
||||
cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
||||
<TabControl Margin="10" Controls:TabControlHelper.IsUnderlined="True" x:Name="Items" cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}" />
|
||||
<TextBlock Text="{Binding DisplayName}" FontSize="22" />
|
||||
</DataTemplate>
|
||||
</TabControl.ItemTemplate>
|
||||
</TabControl>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
Hello, <LineBreak /><LineBreak />
|
||||
Thanks a bunch for downloading this application. You're going to enjoy this! :)<LineBreak />
|
||||
<LineBreak />
|
||||
To get started you can click any of the categories on the left and browse through the effects.
|
||||
To get started you can click any of the categories on the top and browse through the modules.
|
||||
<LineBreak />
|
||||
Some games require a bit of setting up, so be sure to take a look at everything you want to use.
|
||||
<LineBreak /><LineBreak />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user