void DrawSupportPowerTooltip(World world, SupportPower sp, int2 pos) { var tooltipSprite = ChromeProvider.GetImage(renderer, chromeCollection, "tooltip-bg"); rgbaRenderer.DrawSprite(tooltipSprite, pos, "chrome"); rgbaRenderer.Flush(); pos += new int2(5, 5); renderer.BoldFont.DrawText(rgbaRenderer, sp.Info.Description, pos, Color.White); var timer = "Charge Time: {0}".F(FormatTime(sp.RemainingTime)); DrawRightAligned(timer, pos + new int2((int)tooltipSprite.size.X - 10, 0), Color.White); if (sp.Info.LongDesc != null) { pos += new int2(0, 25); renderer.RegularFont.DrawText(rgbaRenderer, sp.Info.LongDesc.Replace("\\n", "\n"), pos, Color.White); } rgbaRenderer.Flush(); }
Action<MouseInput> HandleSupportPower(SupportPower sp) { return mi => { if (mi.Button == MouseButton.Left) sp.Activate(); }; }
Action<bool> HandleSupportPower(SupportPower sp) { return b => { if (b) sp.Activate(); }; }