mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Began work on ability keys
This commit is contained in:
parent
1616d36a77
commit
3d74fa0668
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Windows.Forms.VisualStyles;
|
||||||
using Artemis.KeyboardProviders;
|
using Artemis.KeyboardProviders;
|
||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
@ -75,15 +76,22 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
Height = _keyPad.GetRectangle().Height*Scale,
|
Height = _keyPad.GetRectangle().Height*Scale,
|
||||||
Width = _keyPad.GetRectangle().Width*Scale
|
Width = _keyPad.GetRectangle().Width*Scale
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SetAbilityKeys();
|
||||||
|
|
||||||
MainManager.GameStateWebServer.GameDataReceived += HandleGameData;
|
MainManager.GameStateWebServer.GameDataReceived += HandleGameData;
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetAbilityKeys()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
{
|
{
|
||||||
if (D2Json == null)
|
if (D2Json == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Settings.ShowDead && D2Json?.hero?.alive != null && !D2Json.hero.alive)
|
if (Settings.ShowDead && D2Json?.hero?.alive != null && !D2Json.hero.alive)
|
||||||
{
|
{
|
||||||
UpdateLifeStatus();
|
UpdateLifeStatus();
|
||||||
@ -100,6 +108,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
UpdateMana();
|
UpdateMana();
|
||||||
if (Settings.CanCastItem)
|
if (Settings.CanCastItem)
|
||||||
UpdateItems();
|
UpdateItems();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateMainColor()
|
private void UpdateMainColor()
|
||||||
@ -217,7 +226,10 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
public KeyboardRectangle EventRectangle { get; set; }
|
public KeyboardRectangle EventRectangle { get; set; }
|
||||||
public KeyboardRectangle DayCycleRectangle { get; set; }
|
public KeyboardRectangle DayCycleRectangle { get; set; }
|
||||||
public KeyboardRectangle ManaRectangle { get; set; }
|
public KeyboardRectangle ManaRectangle { get; set; }
|
||||||
|
public KeyboardRectangle[] AbilityKeys { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,18 +74,18 @@
|
|||||||
<!-- Abilities Display -->
|
<!-- Abilities Display -->
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
<TextBlock Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Castable abilities
|
Keyboard Template
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.CanCastAbility, Mode=TwoWay}"
|
<ComboBox Grid.Row="3" Grid.Column="1" x:Name="KeyboardLayouts" ItemsSource="{Binding Path=KeyboardLayouts}" VerticalAlignment="Center"
|
||||||
Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
HorizontalAlignment="Right"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Width="109" Margin="0,6,0,7" />
|
||||||
|
|
||||||
<!-- Items Display -->
|
<!-- Items Display -->
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
<TextBlock Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Castable items
|
Castable Abilities
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.CanCastItem, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.CanCastAbilitie, Mode=TwoWay}"
|
||||||
Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System.Windows.Forms;
|
|||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Artemis.ViewModels.Abstract;
|
using Artemis.ViewModels.Abstract;
|
||||||
|
using Caliburn.Micro;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.Dota2
|
namespace Artemis.Modules.Games.Dota2
|
||||||
{
|
{
|
||||||
@ -19,6 +20,30 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
PlaceConfigFile();
|
PlaceConfigFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BindableCollection<string> KeyboardLayouts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new BindableCollection<string>(
|
||||||
|
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 static string Name => "Dota 2";
|
||||||
public string Content => "Dota 2 Content";
|
public string Content => "Dota 2 Content";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user