mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Release
This commit is contained in:
parent
e8d83d8c53
commit
88e5901b67
@ -35,8 +35,8 @@ namespace Artemis.Managers
|
||||
models.AddRange(overlayModels);
|
||||
// Add games, exclude WoW if needed
|
||||
models.AddRange(_generalSettings.GamestatePort != 62575
|
||||
? gameModels.Where(e => e.Name != "WoW").Where(e => e.Name != "LightFX")
|
||||
: gameModels.Where(e => e.Name != "LightFX"));
|
||||
? gameModels.Where(e => e.Name != "WoW")
|
||||
: gameModels);
|
||||
|
||||
EffectModels = models;
|
||||
_logger.Info("Intialized EffectManager");
|
||||
|
||||
@ -1,73 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Artemis.DAL;
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
using Artemis.Profiles.Layers.Models;
|
||||
using Artemis.Utilities.DataReaders;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Artemis.Modules.Games.LightFx
|
||||
{
|
||||
public class LightFxModel : GameModel
|
||||
{
|
||||
public LightFxModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer)
|
||||
: base(deviceManager, luaManager, SettingsProvider.Load<LightFxSettings>(), new LightFxDataModel())
|
||||
{
|
||||
Name = "LightFX";
|
||||
ProcessName = "LoL";
|
||||
Scale = 4;
|
||||
Enabled = Settings.Enabled;
|
||||
Initialized = false;
|
||||
|
||||
// This model can enable itself by changing its process name to the currently running Light FX game.
|
||||
pipeServer.PipeMessage += PipeServerOnPipeMessage;
|
||||
}
|
||||
|
||||
public int Scale { get; set; }
|
||||
|
||||
private void PipeServerOnPipeMessage(string msg)
|
||||
{
|
||||
// Ensure it's Light FX JSON
|
||||
if (!msg.Contains("lightFxState"))
|
||||
return;
|
||||
|
||||
// Deserialize and data
|
||||
try
|
||||
{
|
||||
JsonConvert.PopulateObject(msg, DataModel);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger?.Error(ex, "Failed to deserialize LightFX JSON");
|
||||
throw;
|
||||
}
|
||||
|
||||
// Setup process name
|
||||
ProcessName = Path.GetFileNameWithoutExtension(((LightFxDataModel) DataModel).LightFxState.game);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Initialized = false;
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
base.Enable();
|
||||
|
||||
Initialized = true;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
}
|
||||
|
||||
public override List<LayerModel> GetRenderLayers(bool keyboardOnly)
|
||||
{
|
||||
return Profile.GetRenderLayers(DataModel, keyboardOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.IO;
|
||||
//using Artemis.DAL;
|
||||
//using Artemis.Managers;
|
||||
//using Artemis.Models;
|
||||
//using Artemis.Profiles.Layers.Models;
|
||||
//using Artemis.Utilities.DataReaders;
|
||||
//using Newtonsoft.Json;
|
||||
//
|
||||
//namespace Artemis.Modules.Games.LightFx
|
||||
//{
|
||||
// public class LightFxModel : GameModel
|
||||
// {
|
||||
// public LightFxModel(DeviceManager deviceManager, LuaManager luaManager, PipeServer pipeServer)
|
||||
// : base(deviceManager, luaManager, SettingsProvider.Load<LightFxSettings>(), new LightFxDataModel())
|
||||
// {
|
||||
// Name = "LightFX";
|
||||
// ProcessName = "LoL";
|
||||
// Scale = 4;
|
||||
// Enabled = Settings.Enabled;
|
||||
// Initialized = false;
|
||||
//
|
||||
// // This model can enable itself by changing its process name to the currently running Light FX game.
|
||||
// pipeServer.PipeMessage += PipeServerOnPipeMessage;
|
||||
// }
|
||||
//
|
||||
// public int Scale { get; set; }
|
||||
//
|
||||
// private void PipeServerOnPipeMessage(string msg)
|
||||
// {
|
||||
// // Ensure it's Light FX JSON
|
||||
// if (!msg.Contains("lightFxState"))
|
||||
// return;
|
||||
//
|
||||
// // Deserialize and data
|
||||
// try
|
||||
// {
|
||||
// JsonConvert.PopulateObject(msg, DataModel);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Logger?.Error(ex, "Failed to deserialize LightFX JSON");
|
||||
// throw;
|
||||
// }
|
||||
//
|
||||
// // Setup process name
|
||||
// ProcessName = Path.GetFileNameWithoutExtension(((LightFxDataModel) DataModel).LightFxState.game);
|
||||
// }
|
||||
//
|
||||
// public override void Dispose()
|
||||
// {
|
||||
// Initialized = false;
|
||||
// base.Dispose();
|
||||
// }
|
||||
//
|
||||
// public override void Enable()
|
||||
// {
|
||||
// base.Enable();
|
||||
//
|
||||
// Initialized = true;
|
||||
// }
|
||||
//
|
||||
// public override void Update()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public override List<LayerModel> GetRenderLayers(bool keyboardOnly)
|
||||
// {
|
||||
// return Profile.GetRenderLayers(DataModel, keyboardOnly);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -1,16 +1,16 @@
|
||||
using Artemis.Managers;
|
||||
using Artemis.Models;
|
||||
using Artemis.ViewModels.Abstract;
|
||||
using Ninject;
|
||||
|
||||
namespace Artemis.Modules.Games.LightFx
|
||||
{
|
||||
public sealed class LightFxViewModel : GameViewModel
|
||||
{
|
||||
public LightFxViewModel(MainManager main, IKernel kernel,
|
||||
[Named("LightFxModel")] GameModel model) : base(main, model, kernel)
|
||||
{
|
||||
DisplayName = "Light FX";
|
||||
}
|
||||
}
|
||||
}
|
||||
//using Artemis.Managers;
|
||||
//using Artemis.Models;
|
||||
//using Artemis.ViewModels.Abstract;
|
||||
//using Ninject;
|
||||
//
|
||||
//namespace Artemis.Modules.Games.LightFx
|
||||
//{
|
||||
// public sealed class LightFxViewModel : GameViewModel
|
||||
// {
|
||||
// public LightFxViewModel(MainManager main, IKernel kernel,
|
||||
// [Named("LightFxModel")] GameModel model) : base(main, model, kernel)
|
||||
// {
|
||||
// DisplayName = "Light FX";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@ -31,7 +31,7 @@
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="By default shows.. nothing yet! Default profiles next update :)" />
|
||||
Text="By default shows RPM on the F-keys, gear on the other keys and track flags on the numpad." />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user