mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 01:42:02 +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 =>
|
Kernel.Bind(x =>
|
||||||
x.FromThisAssembly()
|
x.FromThisAssembly()
|
||||||
.SelectAllClasses()
|
.SelectAllClasses()
|
||||||
.InheritedFrom<LayerCondition>()
|
.InheritedFrom<ILayerCondition>()
|
||||||
.BindAllInterfaces());
|
.BindAllInterfaces());
|
||||||
Kernel.Bind(x =>
|
Kernel.Bind(x =>
|
||||||
x.FromThisAssembly()
|
x.FromThisAssembly()
|
||||||
|
|||||||
@ -23,10 +23,10 @@ namespace Artemis.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public MouseButtons MouseButtons { get; }
|
|
||||||
public HotKey HotKey { get; set; }
|
public HotKey HotKey { get; set; }
|
||||||
public Action Action { get; set; }
|
public MouseButtons MouseButtons { get; }
|
||||||
public KeyType KeyType { get; set; }
|
public KeyType KeyType { get; set; }
|
||||||
|
public Action Action { get; set; }
|
||||||
|
|
||||||
public void InvokeIfMatched(HotKey hotKey, KeyType keyType)
|
public void InvokeIfMatched(HotKey hotKey, KeyType keyType)
|
||||||
{
|
{
|
||||||
@ -34,7 +34,7 @@ namespace Artemis.Models
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (hotKey.Equals(HotKey))
|
if (hotKey.Equals(HotKey))
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InvokeIfMatched(MouseButtons mouseButtons, KeyType keyType)
|
public void InvokeIfMatched(MouseButtons mouseButtons, KeyType keyType)
|
||||||
|
|||||||
@ -1,70 +1,51 @@
|
|||||||
<UserControl x:Class="Artemis.Modules.Games.AssettoCorsa.AssettoCorsaView"
|
<UserControl x:Class="Artemis.Modules.Games.AssettoCorsa.AssettoCorsaView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
mc:Ignorable="d"
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
d:DesignHeight="600" d:DesignWidth="900">
|
||||||
<Grid Margin="15,5,5,5">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Grid.ColumnDefinitions>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<ColumnDefinition />
|
<Label.Content>
|
||||||
<ColumnDefinition />
|
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||||
</Grid.ColumnDefinitions>
|
</Label.Content>
|
||||||
<Grid.RowDefinitions>
|
</Label>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Grid.Row="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." />
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
<!-- Sub header -->
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
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.
|
||||||
The Assetto Corsa module uses the
|
</TextBlock>
|
||||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
|
||||||
NavigateUri="https://github.com/mdjarv/assettocorsasharedmemory">
|
<!-- Enable -->
|
||||||
Assetto Corsa Shared Memory Library
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
</Hyperlink>
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
project by mdjarv
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
</TextBlock>
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
</StackPanel>
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,67 +1,56 @@
|
|||||||
<UserControl x:Class="Artemis.Modules.Games.CounterStrike.CounterStrikeView"
|
<UserControl x:Class="Artemis.Modules.Games.CounterStrike.CounterStrikeView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
mc:Ignorable="d"
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<Grid Margin="15,5,5,5">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap" Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset." />
|
||||||
Text="By default shows team, HP, ammo and money on the keyboard and shows team colors on mouse and headset" />
|
</Label.Content>
|
||||||
</Label.Content>
|
</Label>
|
||||||
</Label>
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<!-- Enable -->
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" 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>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="1"
|
<!-- Directory -->
|
||||||
Grid.Column="0"
|
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Counter-Strike Global Offensive directory" />
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Counter-Strike Global Offensive directory" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<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]" />
|
||||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
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>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Artemis.Managers;
|
using System.Windows.Forms;
|
||||||
|
using Artemis.Managers;
|
||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
|
|
||||||
@ -6,8 +7,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
{
|
{
|
||||||
public sealed class CounterStrikeViewModel : ModuleViewModel
|
public sealed class CounterStrikeViewModel : ModuleViewModel
|
||||||
{
|
{
|
||||||
public CounterStrikeViewModel(MainManager mainManager,
|
public CounterStrikeViewModel(MainManager mainManager, [Named(nameof(CounterStrikeModel))] ModuleModel moduleModel, IKernel kernel)
|
||||||
[Named(nameof(CounterStrikeModel))] ModuleModel moduleModel, IKernel kernel)
|
|
||||||
: base(mainManager, moduleModel, kernel)
|
: base(mainManager, moduleModel, kernel)
|
||||||
{
|
{
|
||||||
DisplayName = "CS:GO";
|
DisplayName = "CS:GO";
|
||||||
@ -15,10 +15,23 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
|
|
||||||
public override bool UsesProfileEditor => true;
|
public override bool UsesProfileEditor => true;
|
||||||
|
|
||||||
public void BrowseDirectory()
|
public void PlaceConfigFile()
|
||||||
{
|
{
|
||||||
((CounterStrikeModel) ModuleModel).PlaceConfigFile();
|
((CounterStrikeModel) ModuleModel).PlaceConfigFile();
|
||||||
NotifyOfPropertyChange(() => Settings);
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15,5,5,5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap" Text="By default shows mana, HP, character state on the keyboard and colors headset and mouse according to HP." />
|
||||||
Text="By default shows mana, HP, character state on the keyboard and colors headset and mouse according to HP" />
|
</Label.Content>
|
||||||
</Label.Content>
|
</Label>
|
||||||
</Label>
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<!-- Enable -->
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" 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>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="1"
|
<!-- Directory -->
|
||||||
Grid.Column="0"
|
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Dota 2 directory" />
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Dota 2 directory" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<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]" />
|
||||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
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>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Artemis.Managers;
|
using System.Windows.Forms;
|
||||||
|
using Artemis.Managers;
|
||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
|
|
||||||
@ -6,18 +7,31 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
{
|
{
|
||||||
public sealed class Dota2ViewModel : ModuleViewModel
|
public sealed class Dota2ViewModel : ModuleViewModel
|
||||||
{
|
{
|
||||||
public Dota2ViewModel(MainManager mainManager, [Named(nameof(Dota2Model))] ModuleModel moduleModel,
|
public Dota2ViewModel(MainManager mainManager, [Named(nameof(Dota2Model))] ModuleModel moduleModel, IKernel kernel)
|
||||||
IKernel kernel) : base(mainManager, moduleModel, kernel)
|
: base(mainManager, moduleModel, kernel)
|
||||||
{
|
{
|
||||||
DisplayName = "Dota 2";
|
DisplayName = "Dota 2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool UsesProfileEditor => true;
|
public override bool UsesProfileEditor => true;
|
||||||
|
|
||||||
public void BrowseDirectory()
|
public void PlaceConfigFile()
|
||||||
{
|
{
|
||||||
((Dota2Model) ModuleModel).PlaceConfigFile();
|
((Dota2Model) ModuleModel).PlaceConfigFile();
|
||||||
NotifyOfPropertyChange(() => Settings);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,101 +3,75 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15,5,5,5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="30" />
|
||||||
<RowDefinition Height="*" />
|
</Grid.RowDefinitions>
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
<!-- Header -->
|
||||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Grid.ColumnDefinitions>
|
<Label.Content>
|
||||||
<ColumnDefinition />
|
<AccessText TextWrapping="Wrap" Text="By default shows indicator lights, speed and engine RPM on the keyboard." />
|
||||||
<ColumnDefinition />
|
</Label.Content>
|
||||||
</Grid.ColumnDefinitions>
|
</Label>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition />
|
<!-- Sub header -->
|
||||||
<RowDefinition />
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
</Grid.RowDefinitions>
|
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.
|
||||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
</TextBlock>
|
||||||
<Label.Content>
|
|
||||||
<AccessText TextWrapping="Wrap"
|
<!-- Enable -->
|
||||||
Text="By default shows indicator lights, speed and engine RPM on the keyboard" />
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
</Label.Content>
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
</Label>
|
<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" />
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
</StackPanel>
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
|
||||||
TextAlignment="Justify" Margin="5,0,0,10">
|
<!-- Directories -->
|
||||||
The Truck Simulator module uses code from the
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
|
||||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
<!-- ETS2 dir -->
|
||||||
NavigateUri="https://github.com/Funbit/ets2-telemetry-server">
|
<Grid.ColumnDefinitions>
|
||||||
ETS2 Telemetry Web Server
|
<ColumnDefinition />
|
||||||
</Hyperlink>
|
<ColumnDefinition />
|
||||||
project by Funbit
|
</Grid.ColumnDefinitions>
|
||||||
</TextBlock>
|
<StackPanel Margin="0,0,1,0" Grid.Column="0">
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
<Label FontSize="16" HorizontalAlignment="Left" Content="Euro Truck Simulator 2 directory" />
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<Grid>
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<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]" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<Button x:Name="Ets2BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
</Grid>
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
</StackPanel>
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
<!-- ATS dir -->
|
||||||
</StackPanel>
|
<StackPanel Margin="0,0,1,0" Grid.Column="1">
|
||||||
</Grid>
|
<Label FontSize="16" HorizontalAlignment="Left" Content="American Truck Simulator directory" />
|
||||||
|
<Grid>
|
||||||
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
|
<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]" />
|
||||||
<!-- ETS2 dir -->
|
<Button x:Name="AtsBrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
<Grid.ColumnDefinitions>
|
</Grid>
|
||||||
<ColumnDefinition />
|
</StackPanel>
|
||||||
<ColumnDefinition />
|
</Grid>
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<StackPanel Margin="0,0,1,0" Grid.Column="0">
|
<!-- Profile editor -->
|
||||||
<Label FontSize="16" HorizontalAlignment="Left" Content="Euro Truck Simulator 2 directory" />
|
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||||
<Grid>
|
|
||||||
<TextBox x:Name="Ets2GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<!-- Buttons -->
|
||||||
Text="{Binding Path=Settings.Ets2GameDirectory, Mode=TwoWay}"
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
cal:Message.Attach="[Event LostFocus] = [Action Ets2PlacePlugin]" />
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
<Button x:Name="Ets2BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944"
|
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
HorizontalAlignment="Right" Width="25"
|
</StackPanel>
|
||||||
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" />
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
<!-- Profile editor -->
|
|
||||||
<ContentControl Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-20,0" />
|
|
||||||
|
|
||||||
<!-- 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>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -1,54 +1,46 @@
|
|||||||
<UserControl x:Class="Artemis.Modules.Games.GtaV.GtaVView"
|
<UserControl x:Class="Artemis.Modules.Games.GtaV.GtaVView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
mc:Ignorable="d"
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<!-- Header -->
|
||||||
<Label.Content>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<AccessText TextWrapping="Wrap"
|
<Label.Content>
|
||||||
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.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<!-- Enable -->
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -3,58 +3,44 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15,5,5,5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Grid.ColumnDefinitions>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<ColumnDefinition />
|
<Label.Content>
|
||||||
<ColumnDefinition />
|
<AccessText TextWrapping="Wrap" Text="Mirrors Light FX lighting to your RGB devices." />
|
||||||
</Grid.ColumnDefinitions>
|
</Label.Content>
|
||||||
<Grid.RowDefinitions>
|
</Label>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
|
||||||
<Label.Content>
|
|
||||||
<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">
|
<!-- Enable -->
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
</StackPanel>
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -3,86 +3,60 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="410.933" d:DesignWidth="732.154">
|
d:DesignHeight="410.933" d:DesignWidth="732.154">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition />
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Grid.ColumnDefinitions>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<ColumnDefinition />
|
<Label.Content>
|
||||||
<ColumnDefinition />
|
<AccessText TextWrapping="Wrap" Text="By default colors the keyboard according to the chosen hero and shows ability cooldowns." />
|
||||||
</Grid.ColumnDefinitions>
|
</Label.Content>
|
||||||
<Grid.RowDefinitions>
|
</Label>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Grid.Row="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." />
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
<!-- Sub header -->
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
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>.
|
||||||
Note: If you're having trouble getting the profile to work, check out
|
</TextBlock>
|
||||||
<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]" />
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Game directory -->
|
<!-- Enable -->
|
||||||
<StackPanel Grid.Row="1"
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
Grid.Column="0"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<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>
|
||||||
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Overwatch Directory" />
|
<!-- Game directory -->
|
||||||
<Grid>
|
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Overwatch Directory" />
|
||||||
Text="{Binding Path=GameSettings.GameDirectory, Mode=TwoWay}"
|
<Grid>
|
||||||
cal:Message.Attach="[Event LostFocus] = [Action PlaceDll]" />
|
<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"
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
HorizontalAlignment="Right" Width="25"
|
</Grid>
|
||||||
Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- Profile editor -->
|
||||||
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor"
|
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||||
Margin="0,0,-30,0" />
|
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -15,6 +15,11 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
|
|
||||||
public override bool UsesProfileEditor => true;
|
public override bool UsesProfileEditor => true;
|
||||||
|
|
||||||
|
public void PlaceDll()
|
||||||
|
{
|
||||||
|
((OverwatchModel)ModuleModel).PlaceDll();
|
||||||
|
}
|
||||||
|
|
||||||
public void BrowseDirectory()
|
public void BrowseDirectory()
|
||||||
{
|
{
|
||||||
var dialog = new FolderBrowserDialog {SelectedPath = ((OverwatchSettings) Settings).GameDirectory};
|
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)
|
public pCarsDataClass MapStructToClass(pCarsAPIStruct pcarsDataStruct, pCarsDataClass pCarsData)
|
||||||
{
|
{
|
||||||
//pCarsDataClass pCarsData = new pCarsDataClass();
|
|
||||||
pCarsData.mVersion = pcarsDataStruct.mVersion;
|
pCarsData.mVersion = pcarsDataStruct.mVersion;
|
||||||
pCarsData.mBuildVersion = pcarsDataStruct.mBuildVersion;
|
pCarsData.mBuildVersion = pcarsDataStruct.mBuildVersion;
|
||||||
|
|
||||||
|
// The game isn't running if these are 0
|
||||||
|
if (pcarsDataStruct.mVersion == 0 && pcarsDataStruct.mBuildVersion == 0)
|
||||||
|
return pCarsData;
|
||||||
|
|
||||||
// Session type
|
// Session type
|
||||||
pCarsData.mGameState = (eGameState) pcarsDataStruct.mGameState;
|
pCarsData.mGameState = (eGameState) pcarsDataStruct.mGameState;
|
||||||
pCarsData.mSessionState = (eSessionState) pcarsDataStruct.mSessionState;
|
pCarsData.mSessionState = (eSessionState) pcarsDataStruct.mSessionState;
|
||||||
|
|||||||
@ -37,6 +37,10 @@ namespace Artemis.Modules.Games.ProjectCars.Data
|
|||||||
if (memoryMappedFile == null)
|
if (memoryMappedFile == null)
|
||||||
InitialiseSharedMemory();
|
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())
|
using (var sharedMemoryStreamView = memoryMappedFile.CreateViewStream())
|
||||||
{
|
{
|
||||||
var sharedMemoryStream = new BinaryReader(sharedMemoryStreamView);
|
var sharedMemoryStream = new BinaryReader(sharedMemoryStreamView);
|
||||||
|
|||||||
@ -3,68 +3,49 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
d:DesignHeight="559.725" d:DesignWidth="882.696">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15,5,5,5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Grid.ColumnDefinitions>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<ColumnDefinition />
|
<Label.Content>
|
||||||
<ColumnDefinition />
|
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||||
</Grid.ColumnDefinitions>
|
</Label.Content>
|
||||||
<Grid.RowDefinitions>
|
</Label>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Grid.Row="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." />
|
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom"
|
<!-- Sub header -->
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
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.
|
||||||
The Project CARS module uses code from the
|
</TextBlock>
|
||||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
|
||||||
NavigateUri="https://bitbucket.org/MikeyTT/pcars-api-demo">
|
<!-- Enable -->
|
||||||
pCars API Demo
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
</Hyperlink>
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
project by MikeyTT
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
</TextBlock>
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" ToolTip="Note: You can't enable an module when Artemis is disabled" />
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right">
|
</StackPanel>
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -4,54 +4,47 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="30" />
|
||||||
<RowDefinition Height="*" />
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
<!-- Header -->
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label.Content>
|
||||||
<Label.Content>
|
<AccessText TextWrapping="Wrap" Text="By default fills up the keyboard and colors all devices according to the amount boost." />
|
||||||
<AccessText TextWrapping="Wrap"
|
</Label.Content>
|
||||||
Text="By default fills up the keyboard and colors all devices according to the amount boost." />
|
</Label>
|
||||||
</Label.Content>
|
|
||||||
</Label>
|
<!-- Sub header -->
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<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"/>
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<!-- Enable -->
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
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>
|
||||||
</StackPanel>
|
|
||||||
|
<!-- Profile editor -->
|
||||||
<!-- Profile editor -->
|
<ContentControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" />
|
||||||
<ContentControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ProfileEditor" Margin="0,0,-30,0" />
|
|
||||||
|
<!-- Buttons -->
|
||||||
<TextBlock x:Name="VersionText" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center"
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
Margin="0,8" TextWrapping="Wrap" HorizontalAlignment="Left"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
Foreground="{DynamicResource HighlightBrush}" />
|
<Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100" Margin="10,0,0,0" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
<!-- Buttons -->
|
</Grid>
|
||||||
<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>
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -36,15 +36,13 @@ namespace Artemis.Modules.Games.RocketLeague
|
|||||||
{
|
{
|
||||||
if (!SettingsProvider.Load<GeneralSettings>().EnablePointersUpdate)
|
if (!SettingsProvider.Load<GeneralSettings>().EnablePointersUpdate)
|
||||||
{
|
{
|
||||||
VersionText = "Note: You disabled pointer updates, this could result in the " +
|
VersionText = "You disabled pointer updates, this could result in the Rocket League effect not working after a game update.";
|
||||||
"Rocket League effect not working after a game update.";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Updater.GetPointers();
|
Updater.GetPointers();
|
||||||
var version = SettingsProvider.Load<OffsetSettings>().RocketLeague.GameVersion;
|
var version = SettingsProvider.Load<OffsetSettings>().RocketLeague.GameVersion;
|
||||||
VersionText = $"Note: Requires patch {version}. When a new patch is released Artemis downloads " +
|
VersionText = $"Requires patch {version}. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings).";
|
||||||
"new pointers for the latest version (unless disabled in settings).";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,60 +1,52 @@
|
|||||||
<UserControl x:Class="Artemis.Modules.Games.TheDivision.TheDivisionView"
|
<UserControl x:Class="Artemis.Modules.Games.TheDivision.TheDivisionView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Artemis.Modules.Games.TheDivision"
|
xmlns:local="clr-namespace:Artemis.Modules.Games.TheDivision"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="416.495" d:DesignWidth="553.608">
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="416.495" d:DesignWidth="553.608">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 5, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap" Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||||
Text="Shows verious game states and events on the keyboard. (BETA, uses much CPU!)" />
|
</Label.Content>
|
||||||
</Label.Content>
|
</Label>
|
||||||
</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"
|
<!-- Sub header -->
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
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)
|
||||||
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>
|
</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 -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -8,62 +8,50 @@
|
|||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition />
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
<!-- Header -->
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<Label.Content>
|
<Label.Content>
|
||||||
<AccessText TextWrapping="Wrap"
|
<AccessText TextWrapping="Wrap" Text="By default shows team, HP armor and ammo on the keyboard and shows team colors on mouse and headset." />
|
||||||
Text="By default shows team, HP armor and ammo on the keyboard and shows team colors on mouse and headset." />
|
</Label.Content>
|
||||||
</Label.Content>
|
</Label>
|
||||||
</Label>
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<!-- Enable -->
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
Style="{StaticResource MahApps.Metro.Styles.ToggleSwitchButton.Win10}" 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>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Game directory -->
|
<!-- Directory -->
|
||||||
<StackPanel Grid.Row="1"
|
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
||||||
Grid.Column="0"
|
|
||||||
Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Unreal Tournament Directory" />
|
<Label FontSize="20" HorizontalAlignment="Left" Content="Unreal Tournament Directory" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBox x:Name="GameDirectory" Height="23" TextWrapping="Wrap" Margin="5,0,30,0"
|
<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]" />
|
||||||
Text="{Binding Path=Settings.GameDirectory, Mode=TwoWay}"
|
<Button x:Name="BrowseDirectory" Content="..." RenderTransformOrigin="-0.039,-0.944" HorizontalAlignment="Right" Width="25" Style="{DynamicResource SquareButtonStyle}" Height="26" />
|
||||||
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>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -32,6 +32,13 @@ namespace Artemis.Modules.Games.UnrealTournament
|
|||||||
NotifyOfPropertyChange(() => Settings);
|
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
|
// Installing GIF on editor open to make sure the proper profiles are loaded
|
||||||
private void InstallGif()
|
private void InstallGif()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,13 +3,14 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="386.842" d:DesignWidth="554.887">
|
d:DesignHeight="386.842" d:DesignWidth="554.887">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 5, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -17,43 +18,39 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition />
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<!-- Header -->
|
||||||
<Label.Content>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<AccessText TextWrapping="Wrap"
|
<Label.Content>
|
||||||
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.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<!-- Sub header -->
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
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">
|
|
||||||
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.
|
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>
|
</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 -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -8,49 +8,45 @@
|
|||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<!-- Header -->
|
||||||
<Label.Content>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<AccessText TextWrapping="Wrap"
|
<Label.Content>
|
||||||
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.Content>
|
||||||
</Label>
|
</Label>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<!-- Sub header -->
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
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.
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
</TextBlock>
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleModule]" />
|
<!-- Enable -->
|
||||||
</StackPanel>
|
<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>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -3,51 +3,44 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<!-- Header -->
|
||||||
<Label.Content>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<AccessText TextWrapping="Wrap" Text="Allows you to create layers shown while not gaming" />
|
<Label.Content>
|
||||||
</Label.Content>
|
<AccessText TextWrapping="Wrap" Text="Allows you to create layers outside the supported games." />
|
||||||
</Label>
|
</Label.Content>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
</Label>
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<!-- Enable -->
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
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>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset module" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,53 +1,46 @@
|
|||||||
<UserControl x:Class="Artemis.Modules.Overlays.OverlayProfile.OverlayProfileView"
|
<UserControl x:Class="Artemis.Modules.Overlays.OverlayProfile.OverlayProfileView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
mc:Ignorable="d"
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
d:DesignHeight="476.986" d:DesignWidth="538.772">
|
||||||
<Grid Margin="15, 5, 15, 5">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,1,0">
|
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<!-- Header -->
|
||||||
<Label.Content>
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||||
<AccessText TextWrapping="Wrap" Text="Allows you to create layers on top of any other active module." />
|
<Label.Content>
|
||||||
</Label.Content>
|
<AccessText TextWrapping="Wrap" Text="Allows you to create layers on top of any other active module." />
|
||||||
</Label>
|
</Label.Content>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
</Label>
|
||||||
<Label Content="Enable module" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
|
||||||
<ToggleButton Margin="0 3 0 0" Width="25" Height="25"
|
<!-- Enable -->
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
ToolTip="Note: You can't enable an module when Artemis is disabled"
|
<Label Content="Enable module" HorizontalAlignment="Right" Margin="0,0,0,3" />
|
||||||
IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}"
|
<controls:ToggleSwitchButton IsChecked="{Binding Path=IsModuleEnabled, Mode=OneWay}" cal:Message.Attach="[Event Click] = [Action ToggleModule]"
|
||||||
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>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Profile editor -->
|
<!-- 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 -->
|
<!-- Buttons -->
|
||||||
<StackPanel Grid.Column="0" Grid.Row="9" Orientation="Horizontal" VerticalAlignment="Bottom">
|
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||||
<Button x:Name="ResetSettings" Content="Reset module" VerticalAlignment="Top" Width="100"
|
<Button x:Name="ResetSettings" Content="Reset effect" VerticalAlignment="Top" Width="100" Style="{DynamicResource SquareButtonStyle}" />
|
||||||
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="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,39 +1,10 @@
|
|||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace Artemis.Profiles.Layers.Abstract
|
namespace Artemis.Profiles.Layers.Abstract
|
||||||
{
|
{
|
||||||
public abstract class LayerCondition
|
public interface ILayerCondition
|
||||||
{
|
{
|
||||||
[JsonIgnore]
|
bool ConditionsMet(LayerModel layerModel, ModuleDataModel dataModel);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,52 +1,27 @@
|
|||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Artemis.Profiles.Layers.Abstract;
|
using Artemis.Profiles.Layers.Abstract;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
|
|
||||||
namespace Artemis.Profiles.Layers.Conditions
|
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)
|
lock (layerModel.Properties.Conditions)
|
||||||
{
|
{
|
||||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null && !c.Field.Contains("hotkey")).ToList();
|
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null).ToList();
|
||||||
|
|
||||||
if (checkConditions.Count == layerModel.Properties.Conditions.Count)
|
|
||||||
return SimpleConditionsMet(layerModel, dataModel, checkConditions);
|
|
||||||
|
|
||||||
var conditionMet = false;
|
|
||||||
switch (layerModel.Properties.ConditionType)
|
switch (layerModel.Properties.ConditionType)
|
||||||
{
|
{
|
||||||
case ConditionType.AnyMet:
|
case ConditionType.AnyMet:
|
||||||
conditionMet = HotKeyMet || checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
return checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
|
||||||
case ConditionType.AllMet:
|
case ConditionType.AllMet:
|
||||||
conditionMet = HotKeyMet && checkConditions.All(cm => cm.ConditionMet(dataModel));
|
return checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
|
||||||
case ConditionType.NoneMet:
|
case ConditionType.NoneMet:
|
||||||
conditionMet = !HotKeyMet && !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
return !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
return conditionMet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,33 +1,28 @@
|
|||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Artemis.Profiles.Layers.Abstract;
|
using Artemis.Profiles.Layers.Abstract;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
|
|
||||||
namespace Artemis.Profiles.Layers.Conditions
|
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)
|
lock (layerModel.Properties.Conditions)
|
||||||
{
|
{
|
||||||
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null && !c.Field.Contains("hotkey")).ToList();
|
var checkConditions = layerModel.Properties.Conditions.Where(c => c.Field != null).ToList();
|
||||||
|
|
||||||
if (checkConditions.Count == layerModel.Properties.Conditions.Count)
|
|
||||||
return SimpleConditionsMet(layerModel, dataModel, checkConditions);
|
|
||||||
|
|
||||||
var conditionsMet = false;
|
var conditionsMet = false;
|
||||||
switch (layerModel.Properties.ConditionType)
|
switch (layerModel.Properties.ConditionType)
|
||||||
{
|
{
|
||||||
case ConditionType.AnyMet:
|
case ConditionType.AnyMet:
|
||||||
conditionsMet = HotKeyMet || checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
conditionsMet = checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
break;
|
||||||
case ConditionType.AllMet:
|
case ConditionType.AllMet:
|
||||||
conditionsMet = HotKeyMet && checkConditions.All(cm => cm.ConditionMet(dataModel));
|
conditionsMet = checkConditions.All(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
break;
|
||||||
case ConditionType.NoneMet:
|
case ConditionType.NoneMet:
|
||||||
conditionsMet = !HotKeyMet && !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
conditionsMet = !checkConditions.Any(cm => cm.ConditionMet(dataModel));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,27 +30,9 @@ namespace Artemis.Profiles.Layers.Conditions
|
|||||||
|
|
||||||
if (conditionsMet)
|
if (conditionsMet)
|
||||||
layerModel.EventProperties.TriggerEvent(layerModel);
|
layerModel.EventProperties.TriggerEvent(layerModel);
|
||||||
if (layerModel.EventProperties.MustStop(layerModel))
|
|
||||||
HotKeyMet = false;
|
|
||||||
|
|
||||||
return layerModel.EventProperties.MustDraw;
|
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
|
#region Layer type properties
|
||||||
|
|
||||||
public ILayerType LayerType { get; set; }
|
public ILayerType LayerType { get; set; }
|
||||||
public LayerCondition LayerCondition { get; set; }
|
public ILayerCondition LayerCondition { get; set; }
|
||||||
public ILayerAnimation LayerAnimation { get; set; }
|
public ILayerAnimation LayerAnimation { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -1,297 +1,297 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Artemis.DeviceProviders;
|
using Artemis.DeviceProviders;
|
||||||
using Artemis.Events;
|
using Artemis.Events;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
using Artemis.Modules.Abstract;
|
using Artemis.Modules.Abstract;
|
||||||
using Artemis.Profiles.Layers.Interfaces;
|
using Artemis.Profiles.Layers.Interfaces;
|
||||||
using Artemis.Profiles.Layers.Models;
|
using Artemis.Profiles.Layers.Models;
|
||||||
using Artemis.Utilities.ParentChild;
|
using Artemis.Utilities.ParentChild;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Artemis.Profiles
|
namespace Artemis.Profiles
|
||||||
{
|
{
|
||||||
public class ProfileModel
|
public class ProfileModel
|
||||||
{
|
{
|
||||||
private readonly char[] _invalidFileNameChars;
|
private readonly char[] _invalidFileNameChars;
|
||||||
private List<KeybindModel> _profileBinds;
|
private List<KeybindModel> _profileBinds;
|
||||||
|
|
||||||
public ProfileModel()
|
public ProfileModel()
|
||||||
{
|
{
|
||||||
_invalidFileNameChars = Path.GetInvalidFileNameChars();
|
_invalidFileNameChars = Path.GetInvalidFileNameChars();
|
||||||
_profileBinds = new List<KeybindModel>();
|
_profileBinds = new List<KeybindModel>();
|
||||||
|
|
||||||
Layers = new ChildItemCollection<ProfileModel, LayerModel>(this);
|
Layers = new ChildItemCollection<ProfileModel, LayerModel>(this);
|
||||||
OnProfileUpdatedEvent += OnOnProfileUpdatedEvent;
|
OnProfileUpdatedEvent += OnOnProfileUpdatedEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChildItemCollection<ProfileModel, LayerModel> Layers { get; }
|
public ChildItemCollection<ProfileModel, LayerModel> Layers { get; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool IsDefault { get; set; }
|
public bool IsDefault { get; set; }
|
||||||
public string KeyboardSlug { get; set; }
|
public string KeyboardSlug { get; set; }
|
||||||
public string GameName { get; set; }
|
public string GameName { get; set; }
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
public int Height { get; set; }
|
public int Height { get; set; }
|
||||||
public string LuaScript { get; set; }
|
public string LuaScript { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string Slug => new string(Name.Where(ch => !_invalidFileNameChars.Contains(ch)).ToArray());
|
public string Slug => new string(Name.Where(ch => !_invalidFileNameChars.Contains(ch)).ToArray());
|
||||||
|
|
||||||
private void OnOnProfileUpdatedEvent(object sender, EventArgs e)
|
private void OnOnProfileUpdatedEvent(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ClearKeybinds();
|
ClearKeybinds();
|
||||||
ApplyKeybinds();
|
ApplyKeybinds();
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<ProfileDeviceEventsArg> OnDeviceUpdatedEvent;
|
public event EventHandler<ProfileDeviceEventsArg> OnDeviceUpdatedEvent;
|
||||||
public event EventHandler<ProfileDeviceEventsArg> OnDeviceDrawnEvent;
|
public event EventHandler<ProfileDeviceEventsArg> OnDeviceDrawnEvent;
|
||||||
public event EventHandler<EventArgs> OnProfileUpdatedEvent;
|
public event EventHandler<EventArgs> OnProfileUpdatedEvent;
|
||||||
|
|
||||||
public void FixOrder()
|
public void FixOrder()
|
||||||
{
|
{
|
||||||
Layers.Sort(l => l.Order);
|
Layers.Sort(l => l.Order);
|
||||||
for (var i = 0; i < Layers.Count; i++)
|
for (var i = 0; i < Layers.Count; i++)
|
||||||
Layers[i].Order = i;
|
Layers[i].Order = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gives all the layers and their children in a flat list
|
/// Gives all the layers and their children in a flat list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<LayerModel> GetLayers()
|
public List<LayerModel> GetLayers()
|
||||||
{
|
{
|
||||||
var layers = new List<LayerModel>();
|
var layers = new List<LayerModel>();
|
||||||
foreach (var layerModel in Layers.OrderBy(l => l.Order))
|
foreach (var layerModel in Layers.OrderBy(l => l.Order))
|
||||||
{
|
{
|
||||||
layers.Add(layerModel);
|
layers.Add(layerModel);
|
||||||
layers.AddRange(layerModel.GetLayers());
|
layers.AddRange(layerModel.GetLayers());
|
||||||
}
|
}
|
||||||
|
|
||||||
return layers;
|
return layers;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generates a flat list containing all layers that must be rendered on the keyboard,
|
/// Generates a flat list containing all layers that must be rendered on the keyboard,
|
||||||
/// the first mouse layer to be rendered and the first headset layer to be rendered
|
/// the first mouse layer to be rendered and the first headset layer to be rendered
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataModel">Instance of said game data model</param>
|
/// <param name="dataModel">Instance of said game data model</param>
|
||||||
/// <param name="keyboardOnly">Whether or not to ignore anything but keyboards</param>
|
/// <param name="keyboardOnly">Whether or not to ignore anything but keyboards</param>
|
||||||
/// <param name="ignoreConditions"></param>
|
/// <param name="ignoreConditions"></param>
|
||||||
/// <returns>A flat list containing all layers that must be rendered</returns>
|
/// <returns>A flat list containing all layers that must be rendered</returns>
|
||||||
public List<LayerModel> GetRenderLayers(ModuleDataModel dataModel, bool keyboardOnly,
|
public List<LayerModel> GetRenderLayers(ModuleDataModel dataModel, bool keyboardOnly,
|
||||||
bool ignoreConditions = false)
|
bool ignoreConditions = false)
|
||||||
{
|
{
|
||||||
var layers = new List<LayerModel>();
|
var layers = new List<LayerModel>();
|
||||||
foreach (var layerModel in Layers.OrderByDescending(l => l.Order))
|
foreach (var layerModel in Layers.OrderByDescending(l => l.Order))
|
||||||
{
|
{
|
||||||
if (!layerModel.Enabled || keyboardOnly && layerModel.LayerType.DrawType != DrawType.Keyboard)
|
if (!layerModel.Enabled || keyboardOnly && layerModel.LayerType.DrawType != DrawType.Keyboard)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!ignoreConditions)
|
if (!ignoreConditions)
|
||||||
if (!layerModel.ConditionsMet(dataModel))
|
if (!layerModel.ConditionsMet(dataModel))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
layers.Add(layerModel);
|
layers.Add(layerModel);
|
||||||
layers.AddRange(layerModel.GetRenderLayers(dataModel, keyboardOnly, ignoreConditions));
|
layers.AddRange(layerModel.GetRenderLayers(dataModel, keyboardOnly, ignoreConditions));
|
||||||
}
|
}
|
||||||
|
|
||||||
return layers;
|
return layers;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Draw all the given layers on the given rect
|
/// Draw all the given layers on the given rect
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceVisualModel"></param>
|
/// <param name="deviceVisualModel"></param>
|
||||||
/// <param name="renderLayers">The layers to render</param>
|
/// <param name="renderLayers">The layers to render</param>
|
||||||
/// <param name="dataModel">The data model to base the layer's properties on</param>
|
/// <param name="dataModel">The data model to base the layer's properties on</param>
|
||||||
/// <param name="preview">Indicates wheter the layer is drawn as a preview, ignoring dynamic properties</param>
|
/// <param name="preview">Indicates wheter the layer is drawn as a preview, ignoring dynamic properties</param>
|
||||||
internal void DrawLayers(DeviceVisualModel deviceVisualModel, List<LayerModel> renderLayers,
|
internal void DrawLayers(DeviceVisualModel deviceVisualModel, List<LayerModel> renderLayers,
|
||||||
ModuleDataModel dataModel, bool preview)
|
ModuleDataModel dataModel, bool preview)
|
||||||
{
|
{
|
||||||
renderLayers = renderLayers.Where(rl => rl.LayerType.DrawType == deviceVisualModel.DrawType).ToList();
|
renderLayers = renderLayers.Where(rl => rl.LayerType.DrawType == deviceVisualModel.DrawType).ToList();
|
||||||
if (!renderLayers.Any())
|
if (!renderLayers.Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Setup the DrawingVisual's size
|
// Setup the DrawingVisual's size
|
||||||
var c = deviceVisualModel.GetDrawingContext();
|
var c = deviceVisualModel.GetDrawingContext();
|
||||||
|
|
||||||
c.PushClip(new RectangleGeometry(deviceVisualModel.Rect));
|
c.PushClip(new RectangleGeometry(deviceVisualModel.Rect));
|
||||||
c.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, deviceVisualModel.Rect);
|
c.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, deviceVisualModel.Rect);
|
||||||
|
|
||||||
// Update the layers
|
// Update the layers
|
||||||
foreach (var layerModel in renderLayers)
|
foreach (var layerModel in renderLayers)
|
||||||
layerModel.Update(dataModel, preview, true);
|
layerModel.Update(dataModel, preview, true);
|
||||||
RaiseDeviceUpdatedEvent(new ProfileDeviceEventsArg(deviceVisualModel.DrawType, dataModel, preview, null));
|
RaiseDeviceUpdatedEvent(new ProfileDeviceEventsArg(deviceVisualModel.DrawType, dataModel, preview, null));
|
||||||
|
|
||||||
// Draw the layers
|
// Draw the layers
|
||||||
foreach (var layerModel in renderLayers)
|
foreach (var layerModel in renderLayers)
|
||||||
layerModel.Draw(dataModel, c, preview, true);
|
layerModel.Draw(dataModel, c, preview, true);
|
||||||
RaiseDeviceDrawnEvent(new ProfileDeviceEventsArg(deviceVisualModel.DrawType, dataModel, preview, c));
|
RaiseDeviceDrawnEvent(new ProfileDeviceEventsArg(deviceVisualModel.DrawType, dataModel, preview, c));
|
||||||
|
|
||||||
// Remove the clip
|
// Remove the clip
|
||||||
c.Pop();
|
c.Pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RaiseDeviceUpdatedEvent(ProfileDeviceEventsArg e)
|
private void RaiseDeviceUpdatedEvent(ProfileDeviceEventsArg e)
|
||||||
{
|
{
|
||||||
OnDeviceUpdatedEvent?.Invoke(this, e);
|
OnDeviceUpdatedEvent?.Invoke(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RaiseDeviceDrawnEvent(ProfileDeviceEventsArg e)
|
public void RaiseDeviceDrawnEvent(ProfileDeviceEventsArg e)
|
||||||
{
|
{
|
||||||
OnDeviceDrawnEvent?.Invoke(this, e);
|
OnDeviceDrawnEvent?.Invoke(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnOnProfileUpdatedEvent()
|
public virtual void OnOnProfileUpdatedEvent()
|
||||||
{
|
{
|
||||||
OnProfileUpdatedEvent?.Invoke(this, EventArgs.Empty);
|
OnProfileUpdatedEvent?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks at all the layers wthin the profile and makes sure they are within boundaries of the given rectangle
|
/// Looks at all the layers wthin the profile and makes sure they are within boundaries of the given rectangle
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="keyboardRectangle"></param>
|
/// <param name="keyboardRectangle"></param>
|
||||||
public void FixBoundaries(Rect keyboardRectangle)
|
public void FixBoundaries(Rect keyboardRectangle)
|
||||||
{
|
{
|
||||||
foreach (var layer in GetLayers())
|
foreach (var layer in GetLayers())
|
||||||
{
|
{
|
||||||
if (!layer.LayerType.ShowInEdtor)
|
if (!layer.LayerType.ShowInEdtor)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var props = layer.Properties;
|
var props = layer.Properties;
|
||||||
var layerRect = new Rect(new Point(props.X, props.Y), new Size(props.Width, props.Height));
|
var layerRect = new Rect(new Point(props.X, props.Y), new Size(props.Width, props.Height));
|
||||||
if (keyboardRectangle.Contains(layerRect))
|
if (keyboardRectangle.Contains(layerRect))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
props.X = 0;
|
props.X = 0;
|
||||||
props.Y = 0;
|
props.Y = 0;
|
||||||
layer.Properties = props;
|
layer.Properties = props;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resizes layers that are shown in the editor and match exactly the full keyboard widht and height
|
/// Resizes layers that are shown in the editor and match exactly the full keyboard widht and height
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="target">The new keyboard to adjust the layers for</param>
|
/// <param name="target">The new keyboard to adjust the layers for</param>
|
||||||
public void ResizeLayers(KeyboardProvider target)
|
public void ResizeLayers(KeyboardProvider target)
|
||||||
{
|
{
|
||||||
foreach (var layer in GetLayers())
|
foreach (var layer in GetLayers())
|
||||||
{
|
{
|
||||||
if (!layer.LayerType.ShowInEdtor ||
|
if (!layer.LayerType.ShowInEdtor ||
|
||||||
!(Math.Abs(layer.Properties.Width - Width) < 0.01) ||
|
!(Math.Abs(layer.Properties.Width - Width) < 0.01) ||
|
||||||
!(Math.Abs(layer.Properties.Height - Height) < 0.01))
|
!(Math.Abs(layer.Properties.Height - Height) < 0.01))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
layer.Properties.Width = target.Width;
|
layer.Properties.Width = target.Width;
|
||||||
layer.Properties.Height = target.Height;
|
layer.Properties.Height = target.Height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Activate(LuaManager luaManager)
|
public void Activate(LuaManager luaManager)
|
||||||
{
|
{
|
||||||
ApplyKeybinds();
|
ApplyKeybinds();
|
||||||
luaManager.SetupLua(this);
|
luaManager.SetupLua(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Deactivate(LuaManager luaManager)
|
public void Deactivate(LuaManager luaManager)
|
||||||
{
|
{
|
||||||
ClearKeybinds();
|
ClearKeybinds();
|
||||||
luaManager.ClearLua();
|
luaManager.ClearLua();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LayerModel AddLayer(LayerModel afterLayer)
|
public LayerModel AddLayer(LayerModel afterLayer)
|
||||||
{
|
{
|
||||||
// Create a new layer
|
// Create a new layer
|
||||||
var layer = LayerModel.CreateLayer();
|
var layer = LayerModel.CreateLayer();
|
||||||
|
|
||||||
if (afterLayer != null)
|
if (afterLayer != null)
|
||||||
{
|
{
|
||||||
afterLayer.InsertAfter(layer);
|
afterLayer.InsertAfter(layer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Layers.Add(layer);
|
Layers.Add(layer);
|
||||||
FixOrder();
|
FixOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyKeybinds()
|
public void ApplyKeybinds()
|
||||||
{
|
{
|
||||||
_profileBinds.Clear();
|
// _profileBinds.Clear();
|
||||||
foreach (var layerModel in GetLayers())
|
// foreach (var layerModel in GetLayers())
|
||||||
{
|
// {
|
||||||
for (var index = 0; index < layerModel.Properties.Conditions.Count; index++)
|
// for (var index = 0; index < layerModel.Properties.Conditions.Count; index++)
|
||||||
{
|
// {
|
||||||
var condition = layerModel.Properties.Conditions[index];
|
// var condition = layerModel.Properties.Conditions[index];
|
||||||
if (condition.Field == null || !condition.Field.Contains("hotkey"))
|
// if (condition.Field == null || !condition.Field.Contains("hotkey"))
|
||||||
continue;
|
// continue;
|
||||||
|
//
|
||||||
// Create an action for the layer, the layer's specific condition type handles activation
|
// // Create an action for the layer, the layer's specific condition type handles activation
|
||||||
if (condition.Operator == "held")
|
// if (condition.Operator == "held")
|
||||||
{
|
// {
|
||||||
var downAction = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
// var downAction = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||||
var downKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-down-{index}", condition.HotKey, KeyType.KeyDown, downAction);
|
// var downKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-down-{index}", condition.HotKey, KeyType.KeyDown, downAction);
|
||||||
var upAction = new Action(() => layerModel.LayerCondition.KeyUpTask(condition));
|
// var upAction = new Action(() => layerModel.LayerCondition.KeyUpTask(condition));
|
||||||
var upKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-up-{index}", condition.HotKey, KeyType.KeyUp, upAction);
|
// var upKb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-up-{index}", condition.HotKey, KeyType.KeyUp, upAction);
|
||||||
|
//
|
||||||
KeybindManager.AddOrUpdate(downKb);
|
// KeybindManager.AddOrUpdate(downKb);
|
||||||
KeybindManager.AddOrUpdate(upKb);
|
// KeybindManager.AddOrUpdate(upKb);
|
||||||
_profileBinds.Add(downKb);
|
// _profileBinds.Add(downKb);
|
||||||
_profileBinds.Add(upKb);
|
// _profileBinds.Add(upKb);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
var action = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
// var action = new Action(() => layerModel.LayerCondition.KeyDownTask(condition));
|
||||||
var kb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-{index}", condition.HotKey, KeyType.KeyDown, action);
|
// var kb = new KeybindModel($"{GameName}-{Name}-{layerModel.Name}-{index}", condition.HotKey, KeyType.KeyDown, action);
|
||||||
|
//
|
||||||
KeybindManager.AddOrUpdate(kb);
|
// KeybindManager.AddOrUpdate(kb);
|
||||||
_profileBinds.Add(kb);
|
// _profileBinds.Add(kb);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearKeybinds()
|
public void ClearKeybinds()
|
||||||
{
|
{
|
||||||
foreach (var keybindModel in _profileBinds)
|
// foreach (var keybindModel in _profileBinds)
|
||||||
KeybindManager.Remove(keybindModel);
|
// KeybindManager.Remove(keybindModel);
|
||||||
_profileBinds.Clear();
|
// _profileBinds.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Compare
|
#region Compare
|
||||||
|
|
||||||
protected bool Equals(ProfileModel other)
|
protected bool Equals(ProfileModel other)
|
||||||
{
|
{
|
||||||
return string.Equals(Slug, other.Slug) &&
|
return string.Equals(Slug, other.Slug) &&
|
||||||
string.Equals(KeyboardSlug, other.KeyboardSlug) &&
|
string.Equals(KeyboardSlug, other.KeyboardSlug) &&
|
||||||
string.Equals(GameName, other.GameName);
|
string.Equals(GameName, other.GameName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
if (ReferenceEquals(null, obj)) return false;
|
if (ReferenceEquals(null, obj)) return false;
|
||||||
if (ReferenceEquals(this, obj)) return true;
|
if (ReferenceEquals(this, obj)) return true;
|
||||||
if (obj.GetType() != GetType()) return false;
|
if (obj.GetType() != GetType()) return false;
|
||||||
return Equals((ProfileModel) obj);
|
return Equals((ProfileModel) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
var hashCode = Slug?.GetHashCode() ?? 0;
|
var hashCode = Slug?.GetHashCode() ?? 0;
|
||||||
hashCode = (hashCode * 397) ^ (KeyboardSlug?.GetHashCode() ?? 0);
|
hashCode = (hashCode * 397) ^ (KeyboardSlug?.GetHashCode() ?? 0);
|
||||||
hashCode = (hashCode * 397) ^ (GameName?.GetHashCode() ?? 0);
|
hashCode = (hashCode * 397) ^ (GameName?.GetHashCode() ?? 0);
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,7 +147,11 @@ namespace Artemis.ViewModels
|
|||||||
|
|
||||||
private void ActivateViews()
|
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.Clear();
|
||||||
Items.AddRange(vms);
|
Items.AddRange(vms);
|
||||||
ActivateItem(vms.FirstOrDefault());
|
ActivateItem(vms.FirstOrDefault());
|
||||||
|
|||||||
@ -3,10 +3,9 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
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>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
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>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@ -3,11 +3,9 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Artemis.Views"
|
|
||||||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
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>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@ -1,64 +1,41 @@
|
|||||||
<UserControl x:Class="Artemis.Views.ProfileEditorView"
|
<UserControl x:Class="Artemis.Views.ProfileEditorView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||||
xmlns:itemBehaviours="clr-namespace:Artemis.ItemBehaviours"
|
xmlns:itemBehaviours="clr-namespace:Artemis.ItemBehaviours"
|
||||||
xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
|
xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
|
||||||
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
|
xmlns:converters="clr-namespace:Artemis.Utilities.Converters"
|
||||||
mc:Ignorable="d"
|
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
d:DesignHeight="510" Width="1055">
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="400" d:DesignWidth="1060">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converters:LayerOrderConverter x:Key="LayerOrderConverter" />
|
<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.Resources>
|
||||||
<UserControl.Triggers>
|
<Grid>
|
||||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
|
||||||
<BeginStoryboard Storyboard="{StaticResource Pulse}" />
|
|
||||||
</EventTrigger>
|
|
||||||
</UserControl.Triggers>
|
|
||||||
<Grid Width="Auto" Height="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="245" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition />
|
<RowDefinition Height="60" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Preview Background="#FF232323" -->
|
<!-- Preview -->
|
||||||
<Label Grid.Column="0" Grid.Row="0" FontSize="20" HorizontalAlignment="Left" Content="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}"
|
<Border Grid.Column="0" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="3">
|
||||||
BorderThickness="3" Width="800" Height="400">
|
<Border Padding="50">
|
||||||
<Border>
|
|
||||||
<Border.Effect>
|
<Border.Effect>
|
||||||
<DropShadowEffect x:Name="ShadowEffect" ShadowDepth="0" Color="{DynamicResource HighlightColor}"
|
<DropShadowEffect x:Name="ShadowEffect" ShadowDepth="0" Color="{DynamicResource HighlightColor}" Opacity="1" BlurRadius="25" />
|
||||||
Opacity="1" />
|
|
||||||
</Border.Effect>
|
</Border.Effect>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardImage}"
|
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardImage}" MinHeight="10" MinWidth="10" Stretch="Uniform" />
|
||||||
Margin="50" />
|
<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}"
|
||||||
<Image Grid.Column="0" Grid.Row="0" Source="{Binding Path=KeyboardPreview}"
|
cal:Message.Attach="[Event MouseMove] = [Action MouseMoveKeyboardPreview($eventArgs)]; [Event MouseDown] = [Action MouseDownKeyboardPreview($eventArgs)]; [Event MouseUp] = [Action MouseUpKeyboardPreview($eventArgs)]" />
|
||||||
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}" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
@ -68,11 +45,9 @@
|
|||||||
<Label Content="Active profile" />
|
<Label Content="Active profile" />
|
||||||
<ComboBox Width="220" VerticalAlignment="Top" x:Name="ProfileNames" Margin="5,0,0,0" />
|
<ComboBox Width="220" VerticalAlignment="Top" x:Name="ProfileNames" Margin="5,0,0,0" />
|
||||||
<Button x:Name="AddProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="AddProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Add profile">
|
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Add profile">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -80,39 +55,29 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="RenameProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="RenameProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Rename profile"
|
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Rename profile"
|
||||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="DuplicateProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="DuplicateProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}" Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0"
|
ToolTip="Duplicate profile" IsEnabled="{Binding Path=ProfileSelected, Mode=OneWay}">
|
||||||
ToolTip="Duplicate profile"
|
|
||||||
IsEnabled="{Binding Path=ProfileSelected, Mode=OneWay}">
|
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="DeleteProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<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}">
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete profile"
|
|
||||||
IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}">
|
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -120,13 +85,12 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock VerticalAlignment="Top" Foreground="{DynamicResource HighlightBrush}" HorizontalAlignment="Left"
|
<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" />
|
||||||
Margin="5,5,0,0" Text="Note: To edit a default profile, duplicate it first." FontWeight="Bold" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Margin="0,5,0,0" HorizontalAlignment="Right">
|
<StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Margin="0,5,0,0" HorizontalAlignment="Right">
|
||||||
<Button x:Name="ImportProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="ImportProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Height="26" HorizontalAlignment="Right">
|
Height="26" HorizontalAlignment="Right">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@ -141,7 +105,7 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="ExportProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="ExportProfile" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" IsEnabled="{Binding ProfileSelected}">
|
Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" IsEnabled="{Binding ProfileSelected}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@ -156,8 +120,8 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="EditLua" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}" Height="26"
|
<Button x:Name="EditLua" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}" Height="26"
|
||||||
HorizontalAlignment="Right" Margin="10,0,0,0" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
HorizontalAlignment="Right" Margin="10,0,0,0" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||||
Visibility="{Binding Path=LuaButtonVisible, Converter={StaticResource BoolToVis} }">
|
Visibility="{Binding Path=LuaButtonVisible, Converter={StaticResource BoolToVis} }">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@ -174,40 +138,34 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Layer list -->
|
<!-- Layer list -->
|
||||||
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
|
<Grid Grid.Column="1" Grid.Row="0">
|
||||||
<Label FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" />
|
<Grid.ColumnDefinitions>
|
||||||
<Label HorizontalAlignment="Right" ToolTip="Show all layers instead of just the one you have selected"
|
<ColumnDefinition Width="Auto" />
|
||||||
Content="Show all" Margin="88,0,0,0" VerticalAlignment="Center" />
|
<ColumnDefinition Width="*" />
|
||||||
<ToggleButton x:Name="ShowAll" ToolTip="Show all layers instead of just the one you have selected"
|
<ColumnDefinition Width="Auto" />
|
||||||
Margin="0 3 0 0" Width="25" Height="25"
|
</Grid.ColumnDefinitions>
|
||||||
IsChecked="{Binding Path=ShowAll, Mode=TwoWay}"
|
<Label Grid.Column="0" FontSize="20" HorizontalAlignment="Left" Content="Layers" Margin="10,0,0,0" VerticalAlignment="Center" />
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}" HorizontalAlignment="Right" />
|
<Label Grid.Column="1" Content="Show all layers" HorizontalAlignment="Right" VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
<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}"
|
<Border Grid.Column="1" Grid.Row="1" Background="#FF232323" BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="3" Margin="5,0,-5,0" Width="235">
|
||||||
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}"
|
||||||
<TreeView x:Name="ProfileTree"
|
ItemsSource="{Binding Path=Layers, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||||
dragDrop:DragDrop.IsDragSource="True"
|
cal:Message.Attach="[Event MouseDoubleClick] = [Action EditLayerFromDoubleClick]">
|
||||||
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>
|
<i:Interaction.Behaviors>
|
||||||
<itemBehaviours:BindableSelectedItemBehavior
|
<itemBehaviours:BindableSelectedItemBehavior
|
||||||
SelectedItem="{Binding SelectedLayer, Mode=TwoWay}" />
|
SelectedItem="{Binding SelectedLayer, Mode=TwoWay}" />
|
||||||
</i:Interaction.Behaviors>
|
</i:Interaction.Behaviors>
|
||||||
<TreeView.Resources>
|
<TreeView.Resources>
|
||||||
<ResourceDictionary
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
|
||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
<TreeView.ItemTemplate>
|
<TreeView.ItemTemplate>
|
||||||
<HierarchicalDataTemplate
|
<HierarchicalDataTemplate ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
||||||
ItemsSource="{Binding Children, Converter={StaticResource LayerOrderConverter}, ConverterParameter=Order}">
|
|
||||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, ElementName=ProfileTree}">
|
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, ElementName=ProfileTree}">
|
||||||
<StackPanel.ContextMenu>
|
<StackPanel.ContextMenu>
|
||||||
<ContextMenu
|
<ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||||
cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
|
||||||
<MenuItem Header="Rename" cal:Message.Attach="RenameLayer($datacontext)" />
|
<MenuItem Header="Rename" cal:Message.Attach="RenameLayer($datacontext)" />
|
||||||
<MenuItem Header="Duplicate" cal:Message.Attach="CloneLayer($datacontext)" />
|
<MenuItem Header="Duplicate" cal:Message.Attach="CloneLayer($datacontext)" />
|
||||||
<MenuItem Header="Delete" cal:Message.Attach="RemoveLayer($datacontext)" />
|
<MenuItem Header="Delete" cal:Message.Attach="RemoveLayer($datacontext)" />
|
||||||
@ -227,14 +185,12 @@
|
|||||||
</TreeView.ItemContainerStyle>
|
</TreeView.ItemContainerStyle>
|
||||||
</TreeView>
|
</TreeView>
|
||||||
</Border>
|
</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"
|
<Button x:Name="AddLayer" VerticalAlignment="Top"
|
||||||
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||||
Width="26" Height="26" ToolTip="Add layer" HorizontalAlignment="Left">
|
Width="26" Height="26" ToolTip="Add layer" HorizontalAlignment="Left">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -242,12 +198,10 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="AddFolder" VerticalAlignment="Top"
|
<Button x:Name="AddFolder" VerticalAlignment="Top"
|
||||||
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding Path=EditorEnabled, Mode=OneWay}"
|
||||||
Width="26" Height="26" ToolTip="Add folder" HorizontalAlignment="Left" Margin="10,0,0,0">
|
Width="26" Height="26" ToolTip="Add folder" HorizontalAlignment="Left" Margin="10,0,0,0">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_folder}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_folder}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -255,12 +209,10 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="EditLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="EditLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Edit layer"
|
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Edit layer"
|
||||||
IsEnabled="{Binding Path=LayerSelected}">
|
IsEnabled="{Binding Path=LayerSelected}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_edit}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -268,12 +220,10 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="CloneLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="CloneLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Duplicate layer"
|
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Duplicate layer"
|
||||||
IsEnabled="{Binding Path=LayerSelected}">
|
IsEnabled="{Binding Path=LayerSelected}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_clipboard_paste}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -281,12 +231,10 @@
|
|||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="RemoveLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
<Button x:Name="RemoveLayer" VerticalAlignment="Top" Style="{DynamicResource SquareButtonStyle}"
|
||||||
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete layer"
|
Width="26" Height="26" HorizontalAlignment="Right" Margin="10,0,0,0" ToolTip="Delete layer"
|
||||||
IsEnabled="{Binding Path=LayerSelected}">
|
IsEnabled="{Binding Path=LayerSelected}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<Rectangle
|
<Rectangle Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" Width="12" Height="12">
|
||||||
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
|
|
||||||
Width="12" Height="12">
|
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
<VisualBrush Visual="{StaticResource appbar_delete}" Stretch="Fill" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
|
|||||||
@ -12,4 +12,4 @@ namespace Artemis.Views
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +1,23 @@
|
|||||||
<Controls:MetroWindow x:Class="Artemis.Views.ShellView"
|
<Controls:MetroWindow x:Class="Artemis.Views.ShellView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
xmlns:cal="http://www.caliburnproject.org"
|
xmlns:cal="http://www.caliburnproject.org"
|
||||||
xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
|
xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
|
||||||
xmlns:viewModels="clr-namespace:Artemis.ViewModels"
|
xmlns:viewModels="clr-namespace:Artemis.ViewModels"
|
||||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
xmlns:tb="http://www.hardcodet.net/taskbar"
|
||||||
dialogs:DialogParticipation.Register="{Binding RelativeSource={RelativeSource Self}, Path=DataContext}"
|
dialogs:DialogParticipation.Register="{Binding RelativeSource={RelativeSource Self}, Path=DataContext}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:ShellViewModel}"
|
||||||
Title="Artemis" Height="800" Width="1210"
|
Title="Artemis" Height="800" Width="1210" MinHeight="600" MinWidth="600" GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico">
|
||||||
MinHeight="800" MinWidth="1210"
|
|
||||||
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico"
|
|
||||||
d:DataContext="{d:DesignInstance viewModels:ShellViewModel}">
|
|
||||||
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
<!-- Bit of extra code to use a different icon than in the taskbar -->
|
||||||
<Controls:MetroWindow.Resources>
|
<Controls:MetroWindow.Resources>
|
||||||
<DrawingImage x:Key="BowIcon">
|
<DrawingImage x:Key="BowIcon">
|
||||||
<DrawingImage.Drawing>
|
<DrawingImage.Drawing>
|
||||||
<DrawingGroup>
|
<DrawingGroup>
|
||||||
<GeometryDrawing Brush="{DynamicResource IdealForegroundColorBrush}"
|
<GeometryDrawing Brush="{DynamicResource IdealForegroundColorBrush}"
|
||||||
Geometry="M1518 3378 c-48 -63 -61 -101 -66 -184 -4 -70 -1 -91 27
|
Geometry="M1518 3378 c-48 -63 -61 -101 -66 -184 -4 -70 -1 -91 27
|
||||||
-170 l31 -89 -27 -20 c-32 -24 -849 -601 -981 -693 l-93 -64 -87 40
|
-170 l31 -89 -27 -20 c-32 -24 -849 -601 -981 -693 l-93 -64 -87 40
|
||||||
c-48 22 -91 37 -95 32 -5 -4 9 -41 29 -83 l37 -75 -28 -24 c-23 -20
|
c-48 22 -91 37 -95 32 -5 -4 9 -41 29 -83 l37 -75 -28 -24 c-23 -20
|
||||||
-29 -35 -33 -81 l-4 -56 -82 -19 c-109 -25 -109 -41 4 -91 l85 -38 7
|
-29 -35 -33 -81 l-4 -56 -82 -19 c-109 -25 -109 -41 4 -91 l85 -38 7
|
||||||
@ -48,7 +45,7 @@
|
|||||||
</DrawingGroup>
|
</DrawingGroup>
|
||||||
</DrawingImage.Drawing>
|
</DrawingImage.Drawing>
|
||||||
</DrawingImage>
|
</DrawingImage>
|
||||||
|
|
||||||
<!-- Tray icon -->
|
<!-- Tray icon -->
|
||||||
<ContextMenu x:Shared="false" x:Key="MainSysTrayMenu">
|
<ContextMenu x:Shared="false" x:Key="MainSysTrayMenu">
|
||||||
<MenuItem Header="Show Artemis" cal:Message.Attach="ShowWindow" />
|
<MenuItem Header="Show Artemis" cal:Message.Attach="ShowWindow" />
|
||||||
@ -60,17 +57,17 @@
|
|||||||
|
|
||||||
<!-- the application main system tray icon -->
|
<!-- the application main system tray icon -->
|
||||||
<tb:TaskbarIcon x:Key="SystemTrayIcon"
|
<tb:TaskbarIcon x:Key="SystemTrayIcon"
|
||||||
IconSource="{Binding Path=ActiveIcon, Mode=OneWay}"
|
IconSource="{Binding Path=ActiveIcon, Mode=OneWay}"
|
||||||
ToolTipText="Artemis"
|
ToolTipText="Artemis"
|
||||||
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
|
cal:Message.Attach="[Event TrayMouseDoubleClick] = [Action ShowWindow]"
|
||||||
ContextMenu="{StaticResource MainSysTrayMenu}" />
|
ContextMenu="{StaticResource MainSysTrayMenu}" />
|
||||||
</Controls:MetroWindow.Resources>
|
</Controls:MetroWindow.Resources>
|
||||||
<Controls:MetroWindow.IconTemplate>
|
<Controls:MetroWindow.IconTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Width="{TemplateBinding Width}"
|
<Grid Width="{TemplateBinding Width}"
|
||||||
Height="{TemplateBinding Height}"
|
Height="{TemplateBinding Height}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
RenderOptions.BitmapScalingMode="HighQuality" Margin="0,0,-10,0">
|
RenderOptions.BitmapScalingMode="HighQuality" Margin="0,0,-10,0">
|
||||||
<Image Source="{DynamicResource BowIcon}" Stretch="Uniform" Margin="6" />
|
<Image Source="{DynamicResource BowIcon}" Stretch="Uniform" Margin="6" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@ -83,7 +80,7 @@
|
|||||||
<Button cal:Message.Attach="Settings">
|
<Button cal:Message.Attach="Settings">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Rectangle Width="10" Height="10"
|
<Rectangle Width="10" Height="10"
|
||||||
Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
|
Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
|
||||||
<Rectangle.OpacityMask>
|
<Rectangle.OpacityMask>
|
||||||
<VisualBrush Stretch="Fill" Visual="{StaticResource appbar_settings}" />
|
<VisualBrush Stretch="Fill" Visual="{StaticResource appbar_settings}" />
|
||||||
</Rectangle.OpacityMask>
|
</Rectangle.OpacityMask>
|
||||||
@ -116,11 +113,10 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<TabControl Margin="0,10,10,10" TabStripPlacement="Left" x:Name="Items"
|
<TabControl Margin="10" Controls:TabControlHelper.IsUnderlined="True" x:Name="Items" cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
||||||
cal:Message.Attach="[Event GotFocus] = [Action CloseSettings]">
|
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding DisplayName}" />
|
<TextBlock Text="{Binding DisplayName}" FontSize="22" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TabControl.ItemTemplate>
|
</TabControl.ItemTemplate>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
Hello, <LineBreak /><LineBreak />
|
Hello, <LineBreak /><LineBreak />
|
||||||
Thanks a bunch for downloading this application. You're going to enjoy this! :)<LineBreak />
|
Thanks a bunch for downloading this application. You're going to enjoy this! :)<LineBreak />
|
||||||
<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 />
|
<LineBreak />
|
||||||
Some games require a bit of setting up, so be sure to take a look at everything you want to use.
|
Some games require a bit of setting up, so be sure to take a look at everything you want to use.
|
||||||
<LineBreak /><LineBreak />
|
<LineBreak /><LineBreak />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user