mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +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.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
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -61,31 +61,31 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Main Color -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" Width="114" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,8">
|
||||
Main keyboard color
|
||||
</TextBlock>
|
||||
<xctk:ColorPicker x:Name="MainColor"
|
||||
SelectedColor="{Binding Path=GameSettings.MainColor, Mode=TwoWay}"
|
||||
Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
||||
<!-- Main Color -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" Width="114" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,8">
|
||||
Main keyboard color
|
||||
</TextBlock>
|
||||
<xctk:ColorPicker x:Name="MainColor"
|
||||
SelectedColor="{Binding Path=GameSettings.MainColor, Mode=TwoWay}"
|
||||
Grid.Row="2" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center" Margin="0,5,-1,5" Height="22" />
|
||||
|
||||
<!-- Abilities Display -->
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,10,0,9">
|
||||
Castable abilities
|
||||
Keyboard Template
|
||||
</TextBlock>
|
||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.CanCastAbility, Mode=TwoWay}"
|
||||
Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||
Margin="0,0,-5,0" Width="114" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" x:Name="KeyboardLayouts" ItemsSource="{Binding Path=KeyboardLayouts}" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Width="109" Margin="0,6,0,7" />
|
||||
|
||||
<!-- Items Display -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,10,0,9">
|
||||
Castable items
|
||||
Castable Abilities
|
||||
</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"
|
||||
Margin="0,0,-5,0" Width="114" />
|
||||
|
||||
@ -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 -->
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" HorizontalAlignment="Left" Width="114" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,8">
|
||||
Mana color
|
||||
</TextBlock>
|
||||
<xctk:ColorPicker x:Name="ManaColor"
|
||||
SelectedColor="{Binding Path=GameSettings.ManaColor, Mode=TwoWay}"
|
||||
Grid.Row="7" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
||||
<!-- Mana Color -->
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" HorizontalAlignment="Left" Width="114" VerticalAlignment="Center"
|
||||
Height="16" Margin="0,8">
|
||||
Mana color
|
||||
</TextBlock>
|
||||
<xctk:ColorPicker x:Name="ManaColor"
|
||||
SelectedColor="{Binding Path=GameSettings.ManaColor, Mode=TwoWay}"
|
||||
Grid.Row="7" Grid.Column="1" Width="110" HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center" Margin="0,5,-1,5" Height="22" />
|
||||
|
||||
<!-- Daytime Display -->
|
||||
|
||||
@ -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<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 string Content => "Dota 2 Content";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user