mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed a crash on LUA editor save
Added default profiles for F1 2017 Added link to wiki in F1 2017 module Adjusted default overlay profile to use fade Adjusted Overwatch profile to automatically work with any new character
This commit is contained in:
parent
be621b0867
commit
37be36119b
@ -89,6 +89,7 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
|
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
|
||||||
|
|
||||||
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
|
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@ namespace Artemis.Models
|
|||||||
private readonly WindowService _windowService;
|
private readonly WindowService _windowService;
|
||||||
private FileSystemWatcher _watcher;
|
private FileSystemWatcher _watcher;
|
||||||
private ModuleModel _luaModule;
|
private ModuleModel _luaModule;
|
||||||
|
private ProfileModel _luaEditorProfile;
|
||||||
|
|
||||||
public ProfileEditorModel(WindowService windowService, MetroDialogService dialogService, DeviceManager deviceManager, LuaManager luaManager)
|
public ProfileEditorModel(WindowService windowService, MetroDialogService dialogService, DeviceManager deviceManager, LuaManager luaManager)
|
||||||
{
|
{
|
||||||
@ -290,6 +291,9 @@ namespace Artemis.Models
|
|||||||
|
|
||||||
public void OpenLuaEditor(ModuleModel moduleModel)
|
public void OpenLuaEditor(ModuleModel moduleModel)
|
||||||
{
|
{
|
||||||
|
if (moduleModel.ProfileModel == null)
|
||||||
|
return;
|
||||||
|
|
||||||
// Clean up old environment
|
// Clean up old environment
|
||||||
DisposeLuaWatcher();
|
DisposeLuaWatcher();
|
||||||
|
|
||||||
@ -305,6 +309,7 @@ namespace Artemis.Models
|
|||||||
|
|
||||||
// Watch the file for changes
|
// Watch the file for changes
|
||||||
_luaModule = moduleModel;
|
_luaModule = moduleModel;
|
||||||
|
_luaEditorProfile = moduleModel.ProfileModel;
|
||||||
_watcher = new FileSystemWatcher(Path.GetTempPath(), fileName);
|
_watcher = new FileSystemWatcher(Path.GetTempPath(), fileName);
|
||||||
_watcher.Changed += LuaFileChanged;
|
_watcher.Changed += LuaFileChanged;
|
||||||
_watcher.EnableRaisingEvents = true;
|
_watcher.EnableRaisingEvents = true;
|
||||||
@ -332,12 +337,13 @@ namespace Artemis.Models
|
|||||||
{
|
{
|
||||||
using (var sr = new StreamReader(fs))
|
using (var sr = new StreamReader(fs))
|
||||||
{
|
{
|
||||||
_luaModule.ProfileModel.LuaScript = sr.ReadToEnd();
|
_luaEditorProfile.LuaScript = sr.ReadToEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileProvider.AddOrUpdate(_luaModule.ProfileModel);
|
ProfileProvider.AddOrUpdate(_luaEditorProfile);
|
||||||
_luaManager.SetupLua(_luaModule.ProfileModel);
|
if (_luaManager.ProfileModel == _luaEditorProfile)
|
||||||
|
_luaManager.SetupLua(_luaModule.ProfileModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,16 @@
|
|||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" 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" Text="There is currently no default profile available for F1 2017." />
|
<AccessText TextWrapping="Wrap" Text="Turns your keyboard into F1 steering wheel, 'nuff said!" />
|
||||||
</Label.Content>
|
</Label.Content>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<!-- Sub header -->
|
<!-- Sub header -->
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
The F1 2017 module requires UDP Telemetry to be enabled in the ingame settings menu.
|
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold" TextAlignment="Justify" Margin="5,0,0,10">
|
||||||
|
The F1 2017 module requires UDP Telemetry to be enabled in the ingame settings menu. For help with this see <Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/SpoinkyNL/Artemis/wiki/F1-2017">the wiki</Hyperlink>.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<!-- Enable -->
|
<!-- Enable -->
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.FormulaOne2017
|
namespace Artemis.Modules.Games.FormulaOne2017
|
||||||
{
|
{
|
||||||
@ -8,5 +9,10 @@ namespace Artemis.Modules.Games.FormulaOne2017
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start(e.Uri.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
{
|
{
|
||||||
public OverwatchStatus Status { get; set; }
|
public OverwatchStatus Status { get; set; }
|
||||||
public OverwatchCharacter Character { get; set; }
|
public OverwatchCharacter Character { get; set; }
|
||||||
|
public string CharacterColor { get; set; }
|
||||||
public bool UltimateReady { get; set; }
|
public bool UltimateReady { get; set; }
|
||||||
public bool Ability1Ready { get; set; }
|
public bool Ability1Ready { get; set; }
|
||||||
public bool Ability2Ready { get; set; }
|
public bool Ability2Ready { get; set; }
|
||||||
|
|||||||
@ -223,6 +223,7 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
|
|
||||||
// Update the datamodel
|
// Update the datamodel
|
||||||
gameDataModel.Character = characterMatch.Character;
|
gameDataModel.Character = characterMatch.Character;
|
||||||
|
gameDataModel.CharacterColor = colors[0, 20].ToHex();
|
||||||
return characterMatch;
|
return characterMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user