Route screen size queries via Game.Renderer.

This commit is contained in:
Paul Chote
2013-09-20 00:09:05 +12:00
parent 65bbfbaef2
commit b7123cda7d
14 changed files with 49 additions and 54 deletions

4
OpenRA.Game/Widgets/TooltipContainerWidget.cs Executable file → Normal file
View File

@@ -54,8 +54,8 @@ namespace OpenRA.Widgets
var pos = Viewport.LastMousePos + CursorOffset;
if (tooltip != null)
{
if (pos.X + tooltip.Bounds.Right > Game.viewport.Width)
pos.X = Game.viewport.Width - tooltip.Bounds.Right;
if (pos.X + tooltip.Bounds.Right > Game.Renderer.Resolution.Width)
pos.X = Game.Renderer.Resolution.Width - tooltip.Bounds.Right;
}
return pos;