diff --git a/Artemis/Artemis/Modules/Games/Dota2/Dota2Model.cs b/Artemis/Artemis/Modules/Games/Dota2/Dota2Model.cs index 020ff945a..ea8bf76c3 100644 --- a/Artemis/Artemis/Modules/Games/Dota2/Dota2Model.cs +++ b/Artemis/Artemis/Modules/Games/Dota2/Dota2Model.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Linq; +using System.Windows.Forms.VisualStyles; using Artemis.KeyboardProviders; using Artemis.Managers; using Artemis.Models; @@ -75,15 +76,22 @@ namespace Artemis.Modules.Games.Dota2 Height = _keyPad.GetRectangle().Height*Scale, Width = _keyPad.GetRectangle().Width*Scale }; + + SetAbilityKeys(); + MainManager.GameStateWebServer.GameDataReceived += HandleGameData; Initialized = true; } + private void SetAbilityKeys() + { + + } + public override void Update() { if (D2Json == null) return; - if (Settings.ShowDead && D2Json?.hero?.alive != null && !D2Json.hero.alive) { UpdateLifeStatus(); @@ -100,6 +108,7 @@ namespace Artemis.Modules.Games.Dota2 UpdateMana(); if (Settings.CanCastItem) UpdateItems(); + } private void UpdateMainColor() @@ -217,7 +226,10 @@ namespace Artemis.Modules.Games.Dota2 public KeyboardRectangle EventRectangle { get; set; } public KeyboardRectangle DayCycleRectangle { get; set; } public KeyboardRectangle ManaRectangle { get; set; } - + public KeyboardRectangle[] AbilityKeys { get; set; } #endregion + + + } } \ No newline at end of file diff --git a/Artemis/Artemis/Modules/Games/Dota2/Dota2View.xaml b/Artemis/Artemis/Modules/Games/Dota2/Dota2View.xaml index 5648d2de4..d95c69e4b 100644 --- a/Artemis/Artemis/Modules/Games/Dota2/Dota2View.xaml +++ b/Artemis/Artemis/Modules/Games/Dota2/Dota2View.xaml @@ -61,31 +61,31 @@ - - - Main keyboard color - - + + Main keyboard color + + - Castable abilities + Keyboard Template - + - Castable items + Castable Abilities - @@ -107,14 +107,14 @@ Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No" Margin="0,0,-5,0" Width="114" /> - - - Mana color - - + + Mana color + + diff --git a/Artemis/Artemis/Modules/Games/Dota2/Dota2ViewModel.cs b/Artemis/Artemis/Modules/Games/Dota2/Dota2ViewModel.cs index 4e6fad97a..a3d62c94d 100644 --- a/Artemis/Artemis/Modules/Games/Dota2/Dota2ViewModel.cs +++ b/Artemis/Artemis/Modules/Games/Dota2/Dota2ViewModel.cs @@ -4,6 +4,7 @@ using System.Windows.Forms; using Artemis.Managers; using Artemis.Properties; using Artemis.ViewModels.Abstract; +using Caliburn.Micro; namespace Artemis.Modules.Games.Dota2 { @@ -19,6 +20,30 @@ namespace Artemis.Modules.Games.Dota2 PlaceConfigFile(); } + public BindableCollection KeyboardLayouts + { + get + { + return new BindableCollection( + new string[] {"Default","MMO","WASD","LOL","HON","Smite"}); + } + } + + private string _selectedLayout; + + public string SelectedLayout + { + get { return _selectedLayout; } + set + { + if (value == _selectedLayout) + return; + _selectedLayout = value; + NotifyOfPropertyChange(() => SelectedLayout); + + } + } + public static string Name => "Dota 2"; public string Content => "Dota 2 Content";