mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Changed Death to Events (Death included)
This commit is contained in:
parent
44626c4dba
commit
c8ec7a1bfc
@ -48,7 +48,7 @@
|
|||||||
<setting name="ShowMana" serializeAs="String">
|
<setting name="ShowMana" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="ShowDead" serializeAs="String">
|
<setting name="ShowEvents" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="MainColor" serializeAs="String">
|
<setting name="MainColor" serializeAs="String">
|
||||||
|
|||||||
@ -98,12 +98,12 @@ namespace Artemis.Modules.Games.Dota2 {
|
|||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public bool ShowDead {
|
public bool ShowEvents {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["ShowDead"]));
|
return ((bool)(this["ShowEvents"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["ShowDead"] = value;
|
this["ShowEvents"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<Setting Name="ShowMana" Type="System.Boolean" Scope="User">
|
<Setting Name="ShowMana" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="ShowDead" Type="System.Boolean" Scope="User">
|
<Setting Name="ShowEvents" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="MainColor" Type="System.Windows.Media.Color" Scope="User">
|
<Setting Name="MainColor" Type="System.Windows.Media.Color" Scope="User">
|
||||||
|
|||||||
@ -72,7 +72,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
|
|
||||||
DayCycleRectangle = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard
|
DayCycleRectangle = new KeyboardRectangle(MainManager.KeyboardManager.ActiveKeyboard
|
||||||
, _keyPad.TopLeft.X*Scale
|
, _keyPad.TopLeft.X*Scale
|
||||||
, _keyPad.BottomRight.Y*Scale
|
, _keyPad.TopLeft.Y* Scale
|
||||||
, new List<Color>()
|
, new List<Color>()
|
||||||
, LinearGradientMode.Horizontal)
|
, LinearGradientMode.Horizontal)
|
||||||
{
|
{
|
||||||
@ -91,7 +91,8 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
#region Long Switch Statement for Keys
|
#region Long Switch Statement for Keys
|
||||||
switch (Settings.KeyboardLayout)
|
switch (Settings.KeyboardLayout)
|
||||||
{
|
{
|
||||||
case "0": //default
|
case "0":
|
||||||
|
case "Default": //default
|
||||||
case "4": //Heroes of newearth
|
case "4": //Heroes of newearth
|
||||||
case "3": //League of Legends
|
case "3": //League of Legends
|
||||||
for (int i = 0; i < AbilityKeysRectangles.Length; i++)
|
for (int i = 0; i < AbilityKeysRectangles.Length; i++)
|
||||||
@ -167,20 +168,20 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
{
|
{
|
||||||
if (D2Json == null)
|
if (D2Json?.map == null)
|
||||||
return;
|
return;
|
||||||
if (Settings.ShowDead && D2Json?.hero?.alive != null && !D2Json.hero.alive)
|
|
||||||
{
|
|
||||||
UpdateLifeStatus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
UpdateMainColor();
|
UpdateMainColor();
|
||||||
|
if (Settings.ShowEvents)
|
||||||
|
UpdateEvents();
|
||||||
|
if (Settings.ShowDayCycle)
|
||||||
|
UpdateDay();
|
||||||
|
if (!D2Json.hero.alive)
|
||||||
|
return;
|
||||||
if (Settings.CanCastAbility)
|
if (Settings.CanCastAbility)
|
||||||
UpdateAbilities();
|
UpdateAbilities();
|
||||||
if (Settings.ShowHealth)
|
if (Settings.ShowHealth)
|
||||||
UpdateHealth();
|
UpdateHealth();
|
||||||
if (Settings.ShowDayCycle)
|
|
||||||
UpdateDay();
|
|
||||||
if (Settings.ShowMana)
|
if (Settings.ShowMana)
|
||||||
UpdateMana();
|
UpdateMana();
|
||||||
|
|
||||||
@ -193,15 +194,34 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
DayCycleRectangle.Colors = list;
|
DayCycleRectangle.Colors = list;
|
||||||
HealthRectangle.Colors = list;
|
HealthRectangle.Colors = list;
|
||||||
ManaRectangle.Colors = list;
|
ManaRectangle.Colors = list;
|
||||||
|
foreach (var key in AbilityKeysRectangles)
|
||||||
|
key.Colors = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateLifeStatus()
|
private void UpdateEvents()
|
||||||
{
|
{
|
||||||
var list = new List<Color> {Color.LightGray};
|
List<Color> list = null;
|
||||||
|
if (!D2Json.hero.alive)
|
||||||
|
list = new List<Color> { Color.LightGray };
|
||||||
|
else if (D2Json.hero.disarmed)
|
||||||
|
list = new List<Color> { Color.Yellow };
|
||||||
|
else if (D2Json.hero.hexed)
|
||||||
|
list = new List<Color> { Color.Yellow };
|
||||||
|
else if (D2Json.hero.silenced)
|
||||||
|
list = new List<Color> { Color.Yellow };
|
||||||
|
else if (D2Json.hero.stunned)
|
||||||
|
list = new List<Color> { Color.Yellow };
|
||||||
|
else if (D2Json.hero.magicimmune)
|
||||||
|
list = new List<Color> { Color.Lime };
|
||||||
|
if(list == null)
|
||||||
|
return;
|
||||||
|
|
||||||
EventRectangle.Colors = list;
|
EventRectangle.Colors = list;
|
||||||
DayCycleRectangle.Colors = list;
|
DayCycleRectangle.Colors = list;
|
||||||
HealthRectangle.Colors = list;
|
HealthRectangle.Colors = list;
|
||||||
ManaRectangle.Colors = list;
|
ManaRectangle.Colors = list;
|
||||||
|
foreach (var item in AbilityKeysRectangles)
|
||||||
|
item.Colors = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateDay()
|
private void UpdateDay()
|
||||||
@ -276,9 +296,12 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
EventRectangle.Draw(g);
|
EventRectangle.Draw(g);
|
||||||
HealthRectangle.Draw(g);
|
HealthRectangle.Draw(g);
|
||||||
ManaRectangle.Draw(g);
|
ManaRectangle.Draw(g);
|
||||||
|
foreach (var item in AbilityKeysRectangles)
|
||||||
|
{
|
||||||
|
item.Draw(g);
|
||||||
|
}
|
||||||
DayCycleRectangle.Draw(g);
|
DayCycleRectangle.Draw(g);
|
||||||
foreach (var key in AbilityKeysRectangles)
|
|
||||||
key.Draw(g);
|
|
||||||
}
|
}
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
public bool ShowHealth { get; set; }
|
public bool ShowHealth { get; set; }
|
||||||
public bool ShowDayCycle { get; set; }
|
public bool ShowDayCycle { get; set; }
|
||||||
public bool ShowMana { get; set; }
|
public bool ShowMana { get; set; }
|
||||||
public bool ShowDead { get; set; }
|
public bool ShowEvents { get; set; }
|
||||||
public Color MainColor { get; set; }
|
public Color MainColor { get; set; }
|
||||||
public Color ManaColor { get; set; }
|
public Color ManaColor { get; set; }
|
||||||
public string KeyboardLayout { get; set; }
|
public string KeyboardLayout { get; set; }
|
||||||
@ -43,7 +43,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
GameDirectory = Dota2.Default.GameDirectory;
|
GameDirectory = Dota2.Default.GameDirectory;
|
||||||
ShowDayCycle = Dota2.Default.ShowDayCycle;
|
ShowDayCycle = Dota2.Default.ShowDayCycle;
|
||||||
ShowMana = Dota2.Default.ShowMana;
|
ShowMana = Dota2.Default.ShowMana;
|
||||||
ShowDead = Dota2.Default.ShowDead;
|
ShowEvents = Dota2.Default.ShowEvents;
|
||||||
AbilityReadyColor = Dota2.Default.AbilityReadyColor;
|
AbilityReadyColor = Dota2.Default.AbilityReadyColor;
|
||||||
AbilityCooldownColor = Dota2.Default.AbilityCooldownColor;
|
AbilityCooldownColor = Dota2.Default.AbilityCooldownColor;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
Dota2.Default.Enabled = Enabled;
|
Dota2.Default.Enabled = Enabled;
|
||||||
Dota2.Default.GameDirectory = GameDirectory;
|
Dota2.Default.GameDirectory = GameDirectory;
|
||||||
Dota2.Default.ShowMana = ShowMana;
|
Dota2.Default.ShowMana = ShowMana;
|
||||||
Dota2.Default.ShowDead = ShowDead;
|
Dota2.Default.ShowEvents = ShowEvents;
|
||||||
Dota2.Default.AbilityCooldownColor = AbilityCooldownColor;
|
Dota2.Default.AbilityCooldownColor = AbilityCooldownColor;
|
||||||
Dota2.Default.AbilityReadyColor = AbilityReadyColor;
|
Dota2.Default.AbilityReadyColor = AbilityReadyColor;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ namespace Artemis.Modules.Games.Dota2
|
|||||||
CanCastAbility = true;
|
CanCastAbility = true;
|
||||||
ShowDayCycle = true;
|
ShowDayCycle = true;
|
||||||
ShowMana = true;
|
ShowMana = true;
|
||||||
ShowDead = true;
|
ShowEvents = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,9 +151,9 @@
|
|||||||
<!-- Dead Display -->
|
<!-- Dead Display -->
|
||||||
<TextBlock Grid.Row="11" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
<TextBlock Grid.Row="11" Grid.Column="0" HorizontalAlignment="Left" Width="168" VerticalAlignment="Center"
|
||||||
Height="16" Margin="0,10,0,9">
|
Height="16" Margin="0,10,0,9">
|
||||||
Display gray when dead
|
Show events on the keyboard
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.ShowDead, Mode=TwoWay}"
|
<controls:ToggleSwitch IsChecked="{Binding Path=GameSettings.ShowEvents, Mode=TwoWay}"
|
||||||
Grid.Row="11" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
Grid.Row="11" Grid.Column="1" HorizontalAlignment="Right" OnLabel="Yes" OffLabel="No"
|
||||||
Margin="0,0,-5,0" Width="114" />
|
Margin="0,0,-5,0" Width="114" />
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user