From 2835bf264eb1adfab7cd1f5be79581cd652e4d6e Mon Sep 17 00:00:00 2001 From: kurokobo <2920259+kurokobo@users.noreply.github.com> Date: Thu, 17 Jun 2021 00:52:49 +0900 Subject: [PATCH] feat: support for official new colors --- AUCapture-WPF/Converters/PlayerColorToBrush.cs | 16 ++++++++++++++-- AUCapture-WPF/MainWindow.xaml.cs | 18 ++++++++++++++++++ AmongUsCapture/Memory/GameMemReader.cs | 8 +++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/AUCapture-WPF/Converters/PlayerColorToBrush.cs b/AUCapture-WPF/Converters/PlayerColorToBrush.cs index 65717861..cbf192b9 100644 --- a/AUCapture-WPF/Converters/PlayerColorToBrush.cs +++ b/AUCapture-WPF/Converters/PlayerColorToBrush.cs @@ -22,7 +22,13 @@ public class PlayerColorToBrush : IValueConverter { PlayerColor.Purple, new SolidColorBrush(Color.FromRgb(107, 47, 187))}, { PlayerColor.Brown, new SolidColorBrush(Color.FromRgb(113, 73, 30))}, { PlayerColor.Cyan, new SolidColorBrush(Color.FromRgb(56, 254, 220))}, - { PlayerColor.Lime, new SolidColorBrush(Color.FromRgb(80, 239, 57))} + { PlayerColor.Lime, new SolidColorBrush(Color.FromRgb(80, 239, 57))}, + { PlayerColor.Maroon, new SolidColorBrush(Color.FromRgb(95, 29, 46))}, + { PlayerColor.Rose, new SolidColorBrush(Color.FromRgb(236, 192, 211))}, + { PlayerColor.Banana, new SolidColorBrush(Color.FromRgb(240, 231, 168))}, + { PlayerColor.Gray, new SolidColorBrush(Color.FromRgb(117, 133, 147))}, + { PlayerColor.Tan, new SolidColorBrush(Color.FromRgb(145, 136, 119))}, + { PlayerColor.Sunset, new SolidColorBrush(Color.FromRgb(215, 100, 100))} }; @@ -62,7 +68,13 @@ public static Color shadeColor(Color inColor, float percent) { { PlayerColor.Purple, new SolidColorBrush(Color.FromRgb(107, 47, 187))}, { PlayerColor.Brown, new SolidColorBrush(Color.FromRgb(113, 73, 30))}, { PlayerColor.Cyan, new SolidColorBrush(Color.FromRgb(56, 254, 220))}, - { PlayerColor.Lime, new SolidColorBrush(Color.FromRgb(80, 239, 57))} + { PlayerColor.Lime, new SolidColorBrush(Color.FromRgb(80, 239, 57))}, + { PlayerColor.Maroon, new SolidColorBrush(Color.FromRgb(95, 29, 46))}, + { PlayerColor.Rose, new SolidColorBrush(Color.FromRgb(236, 192, 211))}, + { PlayerColor.Banana, new SolidColorBrush(Color.FromRgb(240, 231, 168))}, + { PlayerColor.Gray, new SolidColorBrush(Color.FromRgb(117, 133, 147))}, + { PlayerColor.Tan, new SolidColorBrush(Color.FromRgb(145, 136, 119))}, + { PlayerColor.Sunset, new SolidColorBrush(Color.FromRgb(215, 100, 100))} }; diff --git a/AUCapture-WPF/MainWindow.xaml.cs b/AUCapture-WPF/MainWindow.xaml.cs index 2016289a..45ba93bf 100644 --- a/AUCapture-WPF/MainWindow.xaml.cs +++ b/AUCapture-WPF/MainWindow.xaml.cs @@ -554,6 +554,24 @@ private Color PlayerColorToColorOBJ(PlayerColor pColor) { case PlayerColor.Lime: OutputCode = Color.Lime; break; + case PlayerColor.Maroon: + OutputCode = Color.Maroon; + break; + case PlayerColor.Rose: + OutputCode = Color.MistyRose; + break; + case PlayerColor.Banana: + OutputCode = Color.LemonChiffon; + break; + case PlayerColor.Gray: + OutputCode = Color.Gray; + break; + case PlayerColor.Tan: + OutputCode = Color.Tan; + break; + case PlayerColor.Sunset: + OutputCode = Color.LightCoral; + break; } return OutputCode; diff --git a/AmongUsCapture/Memory/GameMemReader.cs b/AmongUsCapture/Memory/GameMemReader.cs index 1c60eacf..1a05e49e 100644 --- a/AmongUsCapture/Memory/GameMemReader.cs +++ b/AmongUsCapture/Memory/GameMemReader.cs @@ -496,7 +496,13 @@ public enum PlayerColor { Purple = 8, Brown = 9, Cyan = 10, - Lime = 11 + Lime = 11, + Maroon = 12, + Rose = 13, + Banana = 14, + Gray = 15, + Tan = 16, + Sunset = 17 } public enum PlayRegion {