From 7ade8e5ef8adb3ad452d6a9ac6f16274cf5b2e1c Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 9 Apr 2010 18:27:02 +1200 Subject: [PATCH] fix issue in prev with mapchooser. also, fix long-standing bug in mapchooser with double-drawing of cancel button --- OpenRA.Game/Chrome.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OpenRA.Game/Chrome.cs b/OpenRA.Game/Chrome.cs index 9d8e22634a..b1132a7a61 100644 --- a/OpenRA.Game/Chrome.cs +++ b/OpenRA.Game/Chrome.cs @@ -281,9 +281,6 @@ namespace OpenRA DrawCentered("Choose Map", new int2(r.Left + w / 2, r.Top + 20), Color.White); rgbaRenderer.Flush(); - DrawDialogBackground(new Rectangle(r.Right - 200 - 160 / 2, - r.Bottom - 50 + 6, 160, 24), "dialog2"); - AddUiButton(new int2(r.Left + 200, r.Bottom - 40), "OK", _ => { @@ -328,12 +325,14 @@ namespace OpenRA var map = kv.Value; var itemRect = new Rectangle(r.Left + 50, y - 2, r.Width - 340, 20); if (map == currentMap) + { + rgbaRenderer.Flush(); DrawDialogBackground(itemRect, "dialog2"); + } renderer.RegularFont.DrawText(rgbaRenderer, map.Title, new int2(r.Left + 60, y), Color.White); var closureMap = map; AddButton(itemRect, _ => { currentMap = closureMap; mapPreviewDirty = true; }); - y += 20; }