diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 56c0725bb3..5cf078838f 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -45,7 +45,7 @@ namespace OpenRa.Game readonly List>> buttons = new List>>(); readonly List digitSprites; - readonly Dictionary tabSprites; + readonly Dictionary tabSprites; readonly Dictionary spsprites; readonly Sprite[] shimSprites; readonly Sprite blank; @@ -149,11 +149,11 @@ namespace OpenRa.Game .ToDictionary( u => u.Key, u => SpriteSheetBuilder.LoadAllSprites(u.Value.Image)[0]); - + tabSprites = groups.Select( (g, i) => Pair.New(g, OpenRa.Game.Graphics.Util.MakeArray(3, - n => SequenceProvider.GetImageFromCollection(renderer, "tabs-"+n,i.ToString())))) + n => i.ToString()))) .ToDictionary(a => a.First, a => a.Second); cantBuild = new Animation("clock"); @@ -305,10 +305,11 @@ namespace OpenRa.Game CheckDeadTab(groupName); continue; } - + string[] tabKeys = { "normal", "ready", "selected" }; var producing = queue.CurrentItem(groupName); var index = q.Key == currentTab ? 2 : (producing != null && producing.Done) ? 1 : 0; - rgbaRenderer.DrawSprite(q.Value[index], new float2(x, y), PaletteType.Chrome); + var race = (Game.LocalPlayer.Race == Race.Allies) ? "allies" : "soviet"; + rgbaRenderer.DrawSprite(SequenceProvider.GetImageFromCollection(renderer,"tabs-"+tabKeys[index], race+"-"+q.Key), new float2(x, y), PaletteType.Chrome); buttons.Add(Pair.New(new Rectangle(x, y, tabWidth, tabHeight), (Action)(isLmb => currentTab = groupName))); diff --git a/OpenRa.Game/Graphics/Minimap.cs b/OpenRa.Game/Graphics/Minimap.cs index 51487212c2..167bd48fe0 100644 --- a/OpenRa.Game/Graphics/Minimap.cs +++ b/OpenRa.Game/Graphics/Minimap.cs @@ -107,9 +107,9 @@ namespace OpenRa.Game.Graphics sheet.Texture.SetData(bitmap); } - public void Draw(float2 pos, bool hasRadar, bool isJammed) + public void Draw(RectangleF rect, bool hasRadar, bool isJammed) { - rgbaRenderer.DrawSprite(sprite, pos, PaletteType.Chrome, new float2(192, 192)); + rgbaRenderer.DrawSprite(sprite, new float2(rect.X, rect.Y), PaletteType.Chrome, new float2(rect.Width, rect.Height)); rgbaRenderer.Flush(); } } diff --git a/chrome.xml b/chrome.xml index 3b9d260008..da99e2edd7 100644 --- a/chrome.xml +++ b/chrome.xml @@ -28,28 +28,47 @@ - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + +