mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Smoothed out Witcher 3 mod installation, updated links to refer to the Wiki
This commit is contained in:
parent
e012721a8e
commit
cee3da0a58
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using Artemis.KeyboardProviders.Corsair;
|
||||
using Artemis.KeyboardProviders.Logitech;
|
||||
using Artemis.Models;
|
||||
using Artemis.Utilities;
|
||||
using Artemis.Utilities.GameState;
|
||||
@ -42,12 +44,18 @@ namespace Artemis.Modules.Games.CounterStrike
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
// TODO: Size stuff
|
||||
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 0, new List<Color>(),
|
||||
// Some keyboards have a different baseline, Corsair F-keys start at row 1
|
||||
int baseLine;
|
||||
if (MainModel.ActiveKeyboard is CorsairRGB)
|
||||
baseLine = 1;
|
||||
else
|
||||
baseLine = 0;
|
||||
|
||||
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, baseLine, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
|
||||
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
|
||||
TeamRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, baseLine + 1, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = MainModel.ActiveKeyboard.Height*Scale - Scale};
|
||||
EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, 1, new List<Color>(),
|
||||
EventRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, baseLine + 1, new List<Color>(),
|
||||
LinearGradientMode.Horizontal) {Height = MainModel.ActiveKeyboard.Height*Scale - Scale};
|
||||
MainModel.GameStateWebServer.GameDataReceived += HandleGameData;
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Artemis.Models;
|
||||
@ -101,6 +103,23 @@ namespace Artemis.Modules.Games.Witcher3
|
||||
"Conflicting file: " + file.Remove(0, dialog.SelectedPath.Length) +
|
||||
"\n\nOnce you press OK you will be taken to an instructions page.",
|
||||
"Conflicting mod found");
|
||||
|
||||
// Put the mod in the documents folder instead
|
||||
// Create the directory structure
|
||||
var folder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Artemis";
|
||||
if (
|
||||
!Directory.Exists(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player"))
|
||||
Directory.CreateDirectory(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player");
|
||||
if (
|
||||
!Directory.Exists(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc"))
|
||||
Directory.CreateDirectory(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc");
|
||||
|
||||
// Install the mod files
|
||||
File.WriteAllText(folder + @"\Witcher3\bin\config\r4game\user_config_matrix\pc\artemis.xml",Resources.artemisXml);
|
||||
File.WriteAllText(folder + @"\Witcher3\mods\modArtemis\content\scripts\game\player\playerWitcher.ws",Resources.playerWitcherWs);
|
||||
|
||||
Process.Start(new ProcessStartInfo("https://github.com/SpoinkyNL/Artemis/wiki/The-Witcher-3"));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,18 +6,24 @@ namespace Artemis.ViewModels
|
||||
{
|
||||
public class OverlaysViewModel : Conductor<IScreen>.Collection.OneActive
|
||||
{
|
||||
private readonly VolumeDisplayViewModel _volumeDisplayVm;
|
||||
private readonly MainModel _mainModel;
|
||||
private VolumeDisplayViewModel _volumeDisplayVm;
|
||||
|
||||
public OverlaysViewModel(MainModel mainModel)
|
||||
{
|
||||
_volumeDisplayVm = new VolumeDisplayViewModel(mainModel) {DisplayName = "Volume Display"};
|
||||
_mainModel = mainModel;
|
||||
}
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
base.OnActivate();
|
||||
|
||||
Items.Clear();
|
||||
|
||||
// This VM appears to be going out of scope, so recreating it every time just to be sure.
|
||||
_volumeDisplayVm = new VolumeDisplayViewModel(_mainModel) { DisplayName = "Volume Display" };
|
||||
ActivateItem(_volumeDisplayVm);
|
||||
ActiveItem = _volumeDisplayVm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,7 +41,7 @@
|
||||
<LineBreak /><LineBreak />
|
||||
There is also an FAQ available over
|
||||
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate"
|
||||
NavigateUri="https://github.com/SpoinkyNL/Artemis">
|
||||
NavigateUri="https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)">
|
||||
here.
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
@ -16,7 +16,7 @@ namespace Artemis.Views
|
||||
|
||||
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/SpoinkyNL/Artemis");
|
||||
Process.Start("https://github.com/SpoinkyNL/Artemis/wiki/Frequently-Asked-Questions-(FAQ)");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user