Polish button tooltips. Add tooltips/hotkeys for menu/sell/repair

This commit is contained in:
Paul Chote
2011-07-05 17:43:19 +12:00
parent 460451c402
commit b4489028de
6 changed files with 42 additions and 34 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Cnc.Widgets
{
class TooltipContainerWidget : Widget
{
public int2 CursorOffset = new int2(20, 0);
public int2 CursorOffset = new int2(0, 20);
public int TooltipDelay = 10;
Widget tooltip;
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (tooltip != null)
{
if (pos.X + tooltip.Bounds.Right > Game.viewport.Width)
pos.X -= 2*CursorOffset.X + tooltip.Bounds.Right;
pos.X = Game.viewport.Width - tooltip.Bounds.Right;
}
return pos;