extracted DrawWorldTooltip

This commit is contained in:
Chris Forbes
2010-04-16 13:32:42 +12:00
parent aaa9c2e579
commit 1741faf7f0

View File

@@ -165,8 +165,14 @@ namespace OpenRA
DrawBuildTabs(world, paletteHeight);
DrawChat();
if (worldTooltipTicks >= worldTooltipDelay && world != null && world.LocalPlayer != null)
DrawWorldTooltip(world);
}
void DrawWorldTooltip(World world)
{
if (worldTooltipTicks < worldTooltipDelay || world == null || world.LocalPlayer == null)
return;
var actor = world.FindUnitsAtMouse(lastMousePos).FirstOrDefault();
if (actor == null) return;
@@ -190,7 +196,6 @@ namespace OpenRA
renderer.BoldFont.DrawText(text, new float2(lastMousePos.X + 30, lastMousePos.Y + 30), Color.White);
renderer.RegularFont.DrawText(text2, new float2(lastMousePos.X + 30, lastMousePos.Y + 50), Color.White);
}
}
public void DrawDialog(string text)
{