extracted DrawWorldTooltip
This commit is contained in:
@@ -165,8 +165,14 @@ namespace OpenRA
|
|||||||
DrawBuildTabs(world, paletteHeight);
|
DrawBuildTabs(world, paletteHeight);
|
||||||
DrawChat();
|
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();
|
var actor = world.FindUnitsAtMouse(lastMousePos).FirstOrDefault();
|
||||||
if (actor == null) return;
|
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.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);
|
renderer.RegularFont.DrawText(text2, new float2(lastMousePos.X + 30, lastMousePos.Y + 50), Color.White);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void DrawDialog(string text)
|
public void DrawDialog(string text)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user