1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Broken commit because.

This commit is contained in:
SpoinkyNL 2016-02-28 11:03:08 +01:00
parent ad5c28ff6f
commit ca6c020385
20 changed files with 120 additions and 37 deletions

View File

@ -66,6 +66,9 @@
<setting name="SecondaryColor" serializeAs="String"> <setting name="SecondaryColor" serializeAs="String">
<value>#FFFF0000</value> <value>#FFFF0000</value>
</setting> </setting>
<setting name="ContextualColor" serializeAs="String">
<value>False</value>
</setting>
</Artemis.Modules.Games.RocketLeague.RocketLeague> </Artemis.Modules.Games.RocketLeague.RocketLeague>
<Artemis.Settings.Offsets> <Artemis.Settings.Offsets>
<setting name="RocketLeague" serializeAs="String"> <setting name="RocketLeague" serializeAs="String">

View File

@ -17,7 +17,7 @@
<!-- Accent and AppTheme setting --> <!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" />
<ResourceDictionary <ResourceDictionary
Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" /> Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
<ResourceDictionary Source="/Resources/Icons.xaml" /> <ResourceDictionary Source="/Resources/Icons.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>

View File

@ -274,7 +274,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Modules\Games\RocketLeague\RocketLeagueModel.cs" /> <Compile Include="Modules\Games\RocketLeague\RocketLeagueModel.cs" />
<Compile Include="Modules\Games\Witcher3\RocketLeagueSettings.cs" /> <Compile Include="Modules\Games\Witcher3\Witcher3Settings.cs" />
<Compile Include="Modules\Games\Witcher3\Witcher3.Designer.cs"> <Compile Include="Modules\Games\Witcher3\Witcher3.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>

View File

@ -68,17 +68,19 @@ namespace Artemis.Managers
if (effectModel.Name == ActiveEffect.Name) if (effectModel.Name == ActiveEffect.Name)
return; return;
ActiveEffect?.Dispose(); // If the main manager is running, pause it and safely change the effect
if (_mainManager.Running)
if (!_mainManager.Running)
{ {
_mainManager.Start(effectModel); ChangeEffectWithPause(effectModel);
return; return;
} }
// If it's not running, change the effect and start it afterwards.
ActiveEffect = effectModel; ActiveEffect = effectModel;
ActiveEffect.Enable(); ActiveEffect.Enable();
_mainManager.Start(effectModel);
if (ActiveEffect is GameModel) if (ActiveEffect is GameModel)
return; return;
@ -90,6 +92,17 @@ namespace Artemis.Managers
_events.PublishOnUIThread(new ActiveEffectChanged(ActiveEffect.Name)); _events.PublishOnUIThread(new ActiveEffectChanged(ActiveEffect.Name));
} }
private void ChangeEffectWithPause(EffectModel effectModel)
{
_mainManager.Pause(effectModel);
_mainManager.PauseCallback += MainManagerOnPauseCallback;
}
private void MainManagerOnPauseCallback(EffectModel callbackEffect)
{
}
/// <summary> /// <summary>
/// Clears the current effect /// Clears the current effect
/// </summary> /// </summary>

View File

@ -10,6 +10,7 @@ namespace Artemis.Models
public MainManager MainManager; public MainManager MainManager;
public string Name; public string Name;
public bool Initialized;
protected EffectModel(MainManager mainManager) protected EffectModel(MainManager mainManager)
{ {
@ -18,8 +19,6 @@ namespace Artemis.Models
public abstract void Dispose(); public abstract void Dispose();
public event SettingsUpdateHandler SettingsUpdateEvent;
// Called on creation // Called on creation
public abstract void Enable(); public abstract void Enable();

View File

@ -19,6 +19,8 @@ namespace Artemis.Modules.Effects.AudioVisualizer
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength); private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength);
private bool _generating; private bool _generating;
private IWaveIn _waveIn; private IWaveIn _waveIn;
private int _sensitivity;
private bool _fromBottom;
public AudioVisualizerModel(MainManager mainManager, AudioVisualizerSettings settings) : base(mainManager) public AudioVisualizerModel(MainManager mainManager, AudioVisualizerSettings settings) : base(mainManager)
{ {
@ -27,6 +29,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
DeviceIds = new List<string>(); DeviceIds = new List<string>();
SpectrumData = new List<byte>(); SpectrumData = new List<byte>();
Scale = 4; Scale = 4;
Initialized = false;
} }
public int Lines { get; set; } public int Lines { get; set; }
@ -42,6 +45,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
_sampleAggregator.PerformFFT = false; _sampleAggregator.PerformFFT = false;
_sampleAggregator.FftCalculated -= FftCalculated; _sampleAggregator.FftCalculated -= FftCalculated;
@ -52,6 +56,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
public override void Enable() public override void Enable()
{ {
Initialized = false;
Lines = MainManager.KeyboardManager.ActiveKeyboard.Width; Lines = MainManager.KeyboardManager.ActiveKeyboard.Width;
// TODO: Device selection // TODO: Device selection
@ -59,6 +64,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
.EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active) .EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active)
.FirstOrDefault()?.ID; .FirstOrDefault()?.ID;
// Apply settings
SoundRectangles = new List<KeyboardRectangle>(); SoundRectangles = new List<KeyboardRectangle>();
for (var i = 0; i < Lines; i++) for (var i = 0; i < Lines; i++)
{ {
@ -72,13 +78,17 @@ namespace Artemis.Modules.Effects.AudioVisualizer
}, },
LinearGradientMode.Vertical) {ContainedBrush = false, Height = 0}); LinearGradientMode.Vertical) {ContainedBrush = false, Height = 0});
} }
_sensitivity = Settings.Sensitivity;
_fromBottom = Settings.FromBottom;
_sampleAggregator.FftCalculated += FftCalculated; _sampleAggregator.FftCalculated += FftCalculated;
_sampleAggregator.PerformFFT = true; _sampleAggregator.PerformFFT = true;
// Start listening for sound data
_waveIn = new WasapiLoopbackCapture(); _waveIn = new WasapiLoopbackCapture();
_waveIn.DataAvailable += OnDataAvailable; _waveIn.DataAvailable += OnDataAvailable;
_waveIn.StartRecording(); _waveIn.StartRecording();
Initialized = true;
} }
public override void Update() public override void Update()
@ -108,7 +118,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
height = (int) Math.Round(SpectrumData[i]/2.55); height = (int) Math.Round(SpectrumData[i]/2.55);
// Apply Sensitivity setting // Apply Sensitivity setting
height = height*Settings.Sensitivity; height = height* _sensitivity;
var keyboardHeight = var keyboardHeight =
(int) Math.Round(MainManager.KeyboardManager.ActiveKeyboard.Height/100.00*height*Scale); (int) Math.Round(MainManager.KeyboardManager.ActiveKeyboard.Height/100.00*height*Scale);
if (keyboardHeight > SoundRectangles[i].Height) if (keyboardHeight > SoundRectangles[i].Height)
@ -119,7 +129,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
SoundRectangles[i].X = i*Scale; SoundRectangles[i].X = i*Scale;
SoundRectangles[i].Width = Scale; SoundRectangles[i].Width = Scale;
if (Settings.FromBottom) if (_fromBottom)
SoundRectangles[i].Y = MainManager.KeyboardManager.ActiveKeyboard.Height*Scale - SoundRectangles[i].Y = MainManager.KeyboardManager.ActiveKeyboard.Height*Scale -
SoundRectangles[i].Height; SoundRectangles[i].Height;
} }

View File

@ -81,12 +81,11 @@
<!-- Bar direction --> <!-- Bar direction -->
<TextBlock Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" <TextBlock Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,9,0,10"> Height="16" Margin="0,9,0,10">
Grow bars bottom (broken, sorry!) Grow bars bottom
</TextBlock> </TextBlock>
<controls:ToggleSwitch IsChecked="{Binding Path=EffectSettings.FromBottom, Mode=TwoWay}" <controls:ToggleSwitch IsChecked="{Binding Path=EffectSettings.FromBottom, Mode=TwoWay}"
Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes"
OffLabel="No" OffLabel="No" Margin="0,0,-5,0" Width="114" />
Margin="0,0,-5,0" Width="114" IsEnabled="False" />
<!-- Bars amount --> <!-- Bars amount -->
<TextBlock Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" <TextBlock Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"

View File

@ -14,6 +14,7 @@ namespace Artemis.Modules.Effects.Debug
Name = "Debug Effect"; Name = "Debug Effect";
Settings = settings; Settings = settings;
Scale = 4; Scale = 4;
Initialized = false;
} }
public int Scale { get; set; } public int Scale { get; set; }
@ -24,10 +25,13 @@ namespace Artemis.Modules.Effects.Debug
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
} }
public override void Enable() public override void Enable()
{ {
Initialized = false;
KeyboardRectangle = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color> KeyboardRectangle = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>
{ {
Color.Red, Color.Red,
@ -38,6 +42,8 @@ namespace Artemis.Modules.Effects.Debug
Color.Purple, Color.Purple,
Color.DeepPink Color.DeepPink
}, LinearGradientMode.Horizontal); }, LinearGradientMode.Horizontal);
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -9,14 +9,23 @@ namespace Artemis.Modules.Effects.TypeHole
public TypeHoleModel(MainManager mainManager) : base(mainManager) public TypeHoleModel(MainManager mainManager) : base(mainManager)
{ {
Name = "TypeHole"; Name = "TypeHole";
Initialized = false;
} }
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
// Disable logic
} }
public override void Enable() public override void Enable()
{ {
Initialized = false;
// Enable logic
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -23,19 +23,25 @@ namespace Artemis.Modules.Effects.TypeWave
_waves = new List<Wave>(); _waves = new List<Wave>();
_randomColor = Color.Red; _randomColor = Color.Red;
Settings = settings; Settings = settings;
Initialized = false;
} }
public TypeWaveSettings Settings { get; set; } public TypeWaveSettings Settings { get; set; }
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
MainManager.KeyboardHook.Unsubscribe(HandleKeypress); MainManager.KeyboardHook.Unsubscribe(HandleKeypress);
} }
public override void Enable() public override void Enable()
{ {
Initialized = false;
// Listener won't start unless the effect is active // Listener won't start unless the effect is active
MainManager.KeyboardHook.Subscribe(HandleKeypress); MainManager.KeyboardHook.Subscribe(HandleKeypress);
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -22,7 +22,6 @@
<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="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -109,7 +108,7 @@
SmallChange="1" IsSnapToTickEnabled="True" /> SmallChange="1" IsSnapToTickEnabled="True" />
<!-- Buttons --> <!-- Buttons -->
<StackPanel Grid.Column="0" Grid.Row="7" Orientation="Horizontal" VerticalAlignment="Bottom"> <StackPanel Grid.Column="0" Grid.Row="8" 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" <Button x:Name="SaveSettings" Content="Save changes" VerticalAlignment="Top" Width="100"

View File

@ -25,6 +25,7 @@ namespace Artemis.Modules.Games.CounterStrike
ProcessName = "csgo"; ProcessName = "csgo";
Scale = 4; Scale = 4;
Enabled = Settings.Enabled; Enabled = Settings.Enabled;
Initialized = false;
} }
public CounterStrikeSettings Settings { get; set; } public CounterStrikeSettings Settings { get; set; }
@ -41,11 +42,14 @@ namespace Artemis.Modules.Games.CounterStrike
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
MainManager.GameStateWebServer.GameDataReceived -= HandleGameData; MainManager.GameStateWebServer.GameDataReceived -= HandleGameData;
} }
public override void Enable() public override void Enable()
{ {
Initialized = false;
// Some keyboards have a different baseline, Corsair F-keys start at row 1 // Some keyboards have a different baseline, Corsair F-keys start at row 1
_topRow = MainManager.KeyboardManager.ActiveKeyboard.KeyboardRegions.First(r => r.RegionName == "TopRow"); _topRow = MainManager.KeyboardManager.ActiveKeyboard.KeyboardRegions.First(r => r.RegionName == "TopRow");
AmmoRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, _topRow.TopLeft.X, AmmoRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, _topRow.TopLeft.X,
@ -64,6 +68,8 @@ namespace Artemis.Modules.Games.CounterStrike
Height = MainManager.KeyboardManager.ActiveKeyboard.Height*Scale - Scale Height = MainManager.KeyboardManager.ActiveKeyboard.Height*Scale - Scale
}; };
MainManager.GameStateWebServer.GameDataReceived += HandleGameData; MainManager.GameStateWebServer.GameDataReceived += HandleGameData;
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -58,5 +58,17 @@ namespace Artemis.Modules.Games.RocketLeague {
this["SecondaryColor"] = value; this["SecondaryColor"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ContextualColor {
get {
return ((bool)(this["ContextualColor"]));
}
set {
this["ContextualColor"] = value;
}
}
} }
} }

View File

@ -11,5 +11,8 @@
<Setting Name="SecondaryColor" Type="System.Windows.Media.Color" Scope="User"> <Setting Name="SecondaryColor" Type="System.Windows.Media.Color" Scope="User">
<Value Profile="(Default)">#FFFF0000</Value> <Value Profile="(Default)">#FFFF0000</Value>
</Setting> </Setting>
<Setting Name="ContextualColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -31,6 +31,7 @@ namespace Artemis.Modules.Games.RocketLeague
ProcessName = "RocketLeague"; ProcessName = "RocketLeague";
Scale = 4; Scale = 4;
Enabled = Settings.Enabled; Enabled = Settings.Enabled;
Initialized = false;
} }
public RocketLeagueSettings Settings { get; set; } public RocketLeagueSettings Settings { get; set; }
@ -39,11 +40,14 @@ namespace Artemis.Modules.Games.RocketLeague
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
_memory = null; _memory = null;
} }
public override void Enable() public override void Enable()
{ {
Initialized = false;
_boostRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color> _boostRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>
{ {
ColorHelpers.ToDrawingColor(Settings.MainColor), ColorHelpers.ToDrawingColor(Settings.MainColor),
@ -53,23 +57,10 @@ namespace Artemis.Modules.Games.RocketLeague
MemoryHelpers.GetPointers(); MemoryHelpers.GetPointers();
_pointer = JsonConvert.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague); _pointer = JsonConvert.DeserializeObject<GamePointersCollectionModel>(Offsets.Default.RocketLeague);
//var test =
// JsonConvert.SerializeObject(new List<GamePointersCollectionModel>
// {
// new GamePointersCollectionModel
// {
// Game = "RocketLeague",
// GameVersion = "1.12",
// GameAddresses = new List<GamePointer> {new GamePointer
// {
// Description = "Boost",
// BasePointer = new IntPtr(0x01581AF4),
// Offsets = new []{0xB4, 0x104, 0x320, 0x708, 0x21C}
// }}
// }
// });
var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName); var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName);
_memory = new Memory(tempProcess); _memory = new Memory(tempProcess);
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -13,12 +13,14 @@ namespace Artemis.Modules.Games.RocketLeague
public bool Enabled { get; set; } public bool Enabled { get; set; }
public Color MainColor { get; set; } public Color MainColor { get; set; }
public Color SecondaryColor { get; set; } public Color SecondaryColor { get; set; }
public bool ContextualColor { get; set; }
public sealed override void Load() public sealed override void Load()
{ {
Enabled = RocketLeague.Default.Enabled; Enabled = RocketLeague.Default.Enabled;
MainColor = RocketLeague.Default.MainColor; MainColor = RocketLeague.Default.MainColor;
SecondaryColor = RocketLeague.Default.SecondaryColor; SecondaryColor = RocketLeague.Default.SecondaryColor;
ContextualColor = RocketLeague.Default.ContextualColor;
} }
public sealed override void Save() public sealed override void Save()
@ -26,6 +28,7 @@ namespace Artemis.Modules.Games.RocketLeague
RocketLeague.Default.Enabled = Enabled; RocketLeague.Default.Enabled = Enabled;
RocketLeague.Default.MainColor = MainColor; RocketLeague.Default.MainColor = MainColor;
RocketLeague.Default.SecondaryColor = SecondaryColor; RocketLeague.Default.SecondaryColor = SecondaryColor;
RocketLeague.Default.ContextualColor = ContextualColor;
RocketLeague.Default.Save(); RocketLeague.Default.Save();
} }
@ -35,6 +38,7 @@ namespace Artemis.Modules.Games.RocketLeague
Enabled = true; Enabled = true;
MainColor = Color.FromArgb(255, 255, 80, 0); MainColor = Color.FromArgb(255, 255, 80, 0);
SecondaryColor = Color.FromArgb(255, 255, 0, 0); SecondaryColor = Color.FromArgb(255, 255, 0, 0);
ContextualColor = false;
} }
} }
} }

View File

@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
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="Auto">
@ -19,6 +20,7 @@
<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="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -58,13 +60,23 @@
Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="0,5,-1,5" Height="22" /> VerticalAlignment="Center" Margin="0,5,-1,5" Height="22" />
<TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8" <!-- Secondary color -->
<TextBlock Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
Height="16" Margin="0,8">
Color bar according to boost amount
</TextBlock>
<controls:ToggleSwitch IsChecked="{Binding Path=RocketLeagueSettings.ContextualColor, Mode=TwoWay}"
Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
Margin="0,0,-5,0" Width="114" />
<!-- Info text -->
<TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
Foreground="#535353" MaxWidth="510" TextAlignment="Justify"> Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
Tip: To find a color combination you like, start an exhibition match, pickup 100 boost and play around with the colors. Tip: To find a color combination you like, start an exhibition match, pickup 100 boost and play around with the colors.
They'll appear on your keyboard immediately! Once you're satisfied don't forget to click save changes. They'll appear on your keyboard immediately! Once you're satisfied don't forget to click save changes.
</TextBlock> </TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8" <TextBlock Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
Foreground="#535353" MaxWidth="510" TextAlignment="Justify"> Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
Note: Requires patch x.x. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings). Note: Requires patch x.x. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings).

View File

@ -25,6 +25,7 @@ namespace Artemis.Modules.Games.Witcher3
ProcessName = "witcher3"; ProcessName = "witcher3";
Scale = 4; Scale = 4;
Enabled = Settings.Enabled; Enabled = Settings.Enabled;
Initialized = false;
_updateSw = new Stopwatch(); _updateSw = new Stopwatch();
_signRegex = new Regex("ActiveSign=(.*)", RegexOptions.Compiled); _signRegex = new Regex("ActiveSign=(.*)", RegexOptions.Compiled);
@ -36,6 +37,7 @@ namespace Artemis.Modules.Games.Witcher3
public override void Dispose() public override void Dispose()
{ {
Initialized = false;
_witcherSettings = null; _witcherSettings = null;
_updateSw.Reset(); _updateSw.Reset();
@ -43,6 +45,8 @@ namespace Artemis.Modules.Games.Witcher3
public override void Enable() public override void Enable()
{ {
Initialized = false;
_signRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>(), _signRect = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard, 0, 0, new List<Color>(),
LinearGradientMode.Horizontal) LinearGradientMode.Horizontal)
{ {
@ -57,6 +61,8 @@ namespace Artemis.Modules.Games.Witcher3
_witcherSettings = witcherSettings; _witcherSettings = witcherSettings;
_updateSw.Start(); _updateSw.Start();
Initialized = true;
} }
public override void Update() public override void Update()

View File

@ -48,12 +48,17 @@ namespace Artemis.ViewModels.Abstract
if (EffectEnabled) if (EffectEnabled)
MainManager.EffectManager.ClearEffect(); MainManager.EffectManager.ClearEffect();
else else
MainManager.EffectManager.ChangeEffect(EffectModel); MainManager.Restart(EffectModel);
} }
public void SaveSettings() public void SaveSettings()
{ {
EffectSettings?.Save(); EffectSettings?.Save();
if (!EffectEnabled)
return;
// Restart the effect if it's currently running to apply settings.
MainManager.Restart(EffectModel);
} }
public void ResetSettings() public void ResetSettings()