mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Project updates, CS:GO fix for Corsair
This commit is contained in:
parent
cee3da0a58
commit
5a3e6341b0
@ -16,6 +16,8 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
{
|
{
|
||||||
public class CounterStrikeModel : GameModel
|
public class CounterStrikeModel : GameModel
|
||||||
{
|
{
|
||||||
|
private int _ammoWidth;
|
||||||
|
|
||||||
public CounterStrikeModel(MainModel mainModel, CounterStrikeSettings settings) : base(mainModel)
|
public CounterStrikeModel(MainModel mainModel, CounterStrikeSettings settings) : base(mainModel)
|
||||||
{
|
{
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
@ -47,9 +49,15 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
// Some keyboards have a different baseline, Corsair F-keys start at row 1
|
// Some keyboards have a different baseline, Corsair F-keys start at row 1
|
||||||
int baseLine;
|
int baseLine;
|
||||||
if (MainModel.ActiveKeyboard is CorsairRGB)
|
if (MainModel.ActiveKeyboard is CorsairRGB)
|
||||||
|
{
|
||||||
baseLine = 1;
|
baseLine = 1;
|
||||||
|
_ammoWidth = 19;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
baseLine = 0;
|
baseLine = 0;
|
||||||
|
_ammoWidth = 16;
|
||||||
|
}
|
||||||
|
|
||||||
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, baseLine, new List<Color>(),
|
AmmoRect = new KeyboardRectangle(MainModel.ActiveKeyboard, 0, baseLine, new List<Color>(),
|
||||||
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
|
LinearGradientMode.Horizontal) {Height = Scale, ContainedBrush = false};
|
||||||
@ -154,7 +162,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var ammoPercentage = (int) Math.Ceiling(100.00/maxAmmo)*ammo;
|
var ammoPercentage = (int) Math.Ceiling(100.00/maxAmmo)*ammo;
|
||||||
AmmoRect.Width = (int) Math.Floor(16/100.00*ammoPercentage)*Scale;
|
AmmoRect.Width = (int) Math.Floor(_ammoWidth / 100.00*ammoPercentage)*Scale;
|
||||||
AmmoRect.Colors = new List<Color>
|
AmmoRect.Colors = new List<Color>
|
||||||
{
|
{
|
||||||
ColorHelpers.ToDrawingColor(Settings.AmmoMainColor),
|
ColorHelpers.ToDrawingColor(Settings.AmmoMainColor),
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Artemis pre-release" VerticalAlignment="Center"
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Artemis 1.0.0" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
<Button Grid.Row="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
|
<Button Grid.Row="0" Grid.Column="1" Focusable="False" Style="{StaticResource AccentedSquareButtonStyle}"
|
||||||
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
|
cal:Message.Attach="[Action NavigateTo('https://github.com/SpoinkyNL/Artemis')]"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user