private static void onGameLoad(EventArgs args) { Spellbook.OnCastSpell += Spellbook_OnCastSpell; Obj_AI_Base.OnIssueOrder += GameObject_issueOrder; Game.OnWndProc += Game_OnWndProc; Drawing.OnDraw += OnDraw; Option = new Menu("StreamSharp", "Stream Sharp", true); Option.SubMenu("Keys").AddItem(new MenuItem("X", "LastHit").SetValue((new KeyBind("X".ToCharArray()[0], KeyBindType.Press)))); Option.SubMenu("Keys").AddItem(new MenuItem("C", "Harras").SetValue((new KeyBind("C".ToCharArray()[0], KeyBindType.Press)))); Option.SubMenu("Keys").AddItem(new MenuItem("V", "Clear").SetValue((new KeyBind("V".ToCharArray()[0], KeyBindType.Press)))); Option.SubMenu("Keys").AddItem(new MenuItem("Space", "Combo").SetValue((new KeyBind(32, KeyBindType.Press)))); Option.AddToMainMenu(); CursorAttack = new Render.Sprite(Properties.Resources.Attack, new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350)); CursorAttack.Add(0); CursorAttack.Visible = false; CursorAttack.OnDraw(); CursorMove = new Render.Sprite(Properties.Resources.normal, new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350)); CursorMove.Add(0); CursorMove.OnDraw(); }
public CommonForceUltimate(ZedMenu zedMenu, ZedSpells zedSpells, Orbwalking.Orbwalker orbwalker) { player = ObjectManager.Player; this.zedMenu = zedMenu; r = zedSpells.R; zedOrbwalker = orbwalker; mouseImage1 = new Render.Sprite(Resources.mouse1, new Vector2(0, 0)); mouseImage1.Scale = new Vector2(0.50f, 0.50f); mouseImage1.Add(); mouseImage2 = new Render.Sprite(Resources.mouse2, new Vector2(0, 0)); mouseImage2.Scale = new Vector2(0.50f, 0.50f); mouseImage2.Add(); denyMouseImage = new Render.Sprite(Resources.denymouse, new Vector2(0, 0)); denyMouseImage.Scale = new Vector2(0.50f, 0.50f); denyMouseImage.Add(); denyMouseImage.Visible = false; Text.Add(); Text.Visible = false; Game.OnWndProc += CheckMouseButtons; Game.OnUpdate += ShowAnimation; }
private static void Game_OnGameLoad(EventArgs args) { sImage = new Render.Sprite(ImageLoader.Load("kaczorek"), new Vector2(100, 100)); sImage.Scale = new Vector2(100, 100); sImage.Add(0); Drawing.OnDraw += Drawing_OnDraw; }
public AnnieButtons(Annie annie) { this.annie = annie; ShowEasyButton = (KoreanUtils.GetParamBool(annie.MainMenu, "showeeasybutton")); int posX = KoreanUtils.GetParamInt(annie.MainMenu, "easybuttonpositionx"); posX = (posX == 0) ? 50 : posX; int posY = KoreanUtils.GetParamInt(annie.MainMenu, "easybuttonpositiony"); posY = (posY == 0) ? 50 : posY; Vector2 pos = new Vector2(posX, posY); StunButtonOn = new Render.Sprite(Resources.StunON, pos); StunButtonOn.Scale = new Vector2(0.90f, 0.90f); StunButtonOn.Add(); StunButtonOff = new Render.Sprite(Resources.StunOFF, pos); StunButtonOff.Scale = new Vector2(0.90f, 0.90f); StunButtonOff.Add(); if (ShowEasyButton) { StunButtonOn.Visible = KoreanUtils.GetParamBool(annie.MainMenu, "savestunforcombo"); StunButtonOff.Visible = !StunButtonOn.Visible; } KoreanUtils.GetParam(annie.MainMenu, "savestunforcombo").ValueChanged += SaveStunForComboValueChanged; Game.OnWndProc += ButtonControl; }
public void LoadOKTW() { Config.SubMenu("About OKTW©").AddItem(new MenuItem("logo", "Intro logo OKTW").SetValue(true)); if (Config.Item("logo").GetValue<bool>()) { Intro = new Render.Sprite(LoadImg("intro"), new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350)); Intro.Add(0); Intro.OnDraw(); } Utility.DelayAction.Add(7000, () => Intro.Remove()); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("disableDraws", "DISABLE UTILITY DRAWS").SetValue(false)); Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("championInfo", "Game Info").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("ShowKDA", "Show flash and R CD").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("ShowRecall", "Show recall").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("posX", "posX").SetValue(new Slider(20, 100, 0))); Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("posY", "posY").SetValue(new Slider(10, 100, 0))); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("GankAlert", "Gank Alert").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("HpBar", "Dmg indicators BAR OKTW© style").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("ShowClicks", "Show enemy clicks").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("SS", "SS notification").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("RF", "R and Flash notification").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("showWards", "Show hidden objects, wards").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("minimap", "Mini-map hack").SetValue(true)); if (Program.AIOmode != 2) { Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarm", "OKTW spells farm").SetValue(true)).Show(); Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmMode", "SPELLS FARM TOGGLE MODE").SetValue(new StringList(new[] { "Scroll down", "Scroll press", "Key toggle", "Disable" }, 1))); Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmKeyToggle", "Key toggle").SetValue(new KeyBind("N".ToCharArray()[0], KeyBindType.Toggle))); Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("showNot", "Show notification").SetValue(true)); Config.Item("spellFarm").Permashow(true); } Tahoma13B = new Font( Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType }); Tahoma13 = new Font( Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType }); TextBold = new Font(Drawing.Direct3DDevice, new FontDescription {FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType}); Q = new Spell(SpellSlot.Q); E = new Spell(SpellSlot.E); W = new Spell(SpellSlot.W); R = new Spell(SpellSlot.R); Game.OnUpdate += Game_OnUpdate; Drawing.OnDraw += OnDraw; Drawing.OnEndScene += Drawing_OnEndScene; Game.OnWndProc += Game_OnWndProc; }
public static void Initialize() { AdSprite = new Render.Sprite(Properties.Resources.PopBlanc, AdPosition); AdSprite.Add(); adDisplayed = LeagueSharp.Common.Utils.TickCount; Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; }
/// <summary> /// Initializes the sprite reference. To be called when the assembly is loaded. /// </summary> internal static void InitalizeSprite() { sprite = new Render.Sprite(Properties.Resources.ScopeSprite, new Vector2()); { sprite.Scale = new Vector2(1.0f, 1.0f); sprite.PositionUpdate = () => RTargetPosition; sprite.VisibleCondition = s => DrawCondition; } sprite.Add(); }
public Overlay() { if(Drawing.Width != 1920 || Drawing.Height != 1080 || Utility.Map.GetMap()._MapType != Utility.Map.MapType.SummonersRift) return; Program.Menu.AddSubMenu(new Menu("HUD", "HUD")); Program.Menu.SubMenu("HUD").AddItem(new MenuItem("showHud", "Show HUD").SetValue(true)); Hud = new Render.Sprite(Properties.Resources.Overlay2, new Vector2(1, 1)); Hud.Add(); Drawing.OnDraw += Drawing_OnDraw; }
private static void Game_OnGameLoad(EventArgs args) { config = new Menu("Custom Overlay", "Custom Overlay", true); config.AddItem(new MenuItem("slider", "Choose Overlay").SetValue(new Slider(1, 1, 42))); sprite = new Render.Sprite(Properties.Resources.hud_1, new Vector2(1, 1)); sprite.Add(0); Game.PrintChat("<font color='#FF00BF'>Custom Overlay Loaded By</font> <font color='#FF0000'>The</font><font color='#FFFF00'>Kush</font><font color='#40FF00'>Style</font>"); Game.OnGameUpdate += OnGameUpdate; }
private static void OnGameUpdate(EventArgs args) { UpdateImage((Bitmap)Properties.Resources.ResourceManager.GetObject(string.Format("hud_{0}", config.Item("slider").GetValue<Slider>().Value))); CustomEvents.Game.OnGameLoad += eventArgs => { config = new Menu("Custom Overlay", "Custom Overlay", true); config.AddItem(new MenuItem("slider", "Choose Overlay").SetValue(new Slider(1, 1,42))); sprite = new Render.Sprite(Properties.Resources.hud_1, new Vector2(1, 1)); sprite.Add(0); Game.PrintChat("<font color='#FF00BF'>Custom Overlay Loaded By</font> <font color='#FF0000'>The</font><font color='#FFFF00'>Kush</font><font color='#40FF00'>Style</font>"); }; }
public ZedComboSelector(ZedMenu zedMenu) { this.zedMenu = zedMenu; theLineImage = new Render.Sprite(Resources.ZedTheLine, new Vector2(1F, 1F)); theLineImage.Scale = new Vector2(0.9f, 0.9f); theLineImage.Add(); theLineImage.Visible = false; allStarImage = new Render.Sprite(Resources.ZedStar, new Vector2(1F, 1F)); allStarImage.Scale = new Vector2(0.9f, 0.9f); allStarImage.Add(); allStarImage.Visible = false; Game.OnWndProc += Game_OnWndProc; }
private static Render.Sprite loadleaguesharp() { _posLsharp = GetScaledVector(_posLsharp); var loadlsharp = new Render.Sprite(Resources.lsharpicon, _posLsharp) { Scale = _scale, Color = new ColorBGRA(255f, 255f, 255f, 20f) }; loadlsharp.Position = GetPosition(loadlsharp.Width - 700); loadlsharp.Show(); loadlsharp.Add(0); return loadlsharp; }
public HeroTracker(Obj_AI_Hero hero, Bitmap bmp) { Hero = hero; RecallStatus = Packet.S2C.Teleport.Status.Unknown; Hero = hero; var image = new Render.Sprite(bmp, new Vector2(0, 0)); image.GrayScale(); image.Scale = new Vector2(MinimapHack.Instance().Menu.IconScale, MinimapHack.Instance().Menu.IconScale); image.VisibleCondition = sender => !hero.IsVisible && !hero.IsDead; image.PositionUpdate = delegate { Vector2 v2 = Drawing.WorldToMinimap(LastLocation); v2.X -= image.Width / 2f; v2.Y -= image.Height / 2f; return v2; }; image.Add(0); LastSeen = 0; LastLocation = hero.ServerPosition; PredictedLocation = hero.ServerPosition; BeforeRecallLocation = hero.ServerPosition; Text = new Render.Text(0, 0, "", MinimapHack.Instance().Menu.SSTimerSize, Color.White) { VisibleCondition = sender => !hero.IsVisible && !Hero.IsDead && MinimapHack.Instance().Menu.SSTimer && LastSeen > 20f && MinimapHack.Instance().Menu.SSTimerStart <= Game.ClockTime - LastSeen, PositionUpdate = delegate { Vector2 v2 = Drawing.WorldToMinimap(LastLocation); v2.Y += MinimapHack.Instance().Menu.SSTimerOffset; return v2; }, TextUpdate = () => Program.Format(Game.ClockTime - LastSeen), OutLined = true, Centered = true }; Text.Add(0); Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport; Game.OnGameUpdate += Game_OnGameUpdate; Drawing.OnEndScene += Drawing_OnEndScene; }
/*private Vector2 TextPos { get { return Drawing.WorldToScreen(new Vector2(Pos.X,Pos.Y+25).To3D()); } } private String GetHp { get { var condition = (Hero != null && PennyJinx.IsMenuEnabled("SpriteDraw") && PennyJinx._r.IsReady()); return condition?"Killable! " + Hero.Health + " HP":"Error getting HP"; } }*/ //Constructor public ScopeSprite() { _texture = Texture.FromMemory( Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.scope, typeof(byte[])), 300, 300, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0); _sprite = new Render.Sprite(_texture, new Vector2(0, 0)) { VisibleCondition = s => Condition, PositionUpdate = () => Pos, Scale = new Vector2(0.65f, 0.65f) }; _sprite.Add(0); Drawing.OnEndScene += Drawing_OnEndScene; Drawing.OnPreReset += Drawing_OnPreReset; Drawing.OnPostReset += Drawing_OnPostReset; AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload; AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload; }
public CommonForceUltimate(ICommonChampion champion) { this.champion = champion; MouseImage1 = new Render.Sprite(Resources.Mouse1, new Vector2(0, 0)); MouseImage1.Scale = new Vector2(0.50f, 0.50f); MouseImage1.Add(); MouseImage2 = new Render.Sprite(Resources.Mouse2, new Vector2(0, 0)); MouseImage2.Scale = new Vector2(0.50f, 0.50f); MouseImage2.Add(); DenyMouseImage = new Render.Sprite(Resources.DenyMouse, new Vector2(0, 0)); DenyMouseImage.Scale = new Vector2(0.50f, 0.50f); DenyMouseImage.Add(); DenyMouseImage.Visible = false; text.Add(); text.Visible = false; Game.OnWndProc += CheckMouseButtons; Game.OnUpdate += ShowAnimation; }
private static void GameOnOnGameLoad(EventArgs args) { _greenBar = new Render.Sprite(Resource1.bar_green, new Vector2(Drawing.Width / 2 - ImgWidth / 2, 100)); _redBar = new Render.Sprite(Resource1.bar_red, new Vector2(Drawing.Width / 2 - ImgWidth / 2, 100)); _leftText = new Render.Text( "2375", _redBar.X - Drawing.GetTextExtent("2375").Width, _redBar.Y, 12, Color.White); _middleText = new Render.Text( "50%", Drawing.Width / 2 - Drawing.GetTextExtent("50%").Width / 2, _redBar.Y, 12, Color.White); _rightText = new Render.Text( "2375", _redBar.X + Drawing.GetTextExtent("2375").Width, _redBar.Y, 12, Color.White); _redBar.Add(); _greenBar.Add(); _leftText.Add(); _middleText.Add(); _rightText.Add(); UpdateDrawings(); Game.OnProcessPacket += Game_OnGameProcessPacket; Game.PrintChat("Golderino by ChewyMoon loaded."); }
private void InitSummonerImage(Bitmap bmp) { Game.OnUpdate += Drawing_OnDraw; sImage = new Render.Sprite(bmp, new Vector2(0, 0)); //sImage.Scale = new Vector2(0.5f, 0.5f); sImage.VisibleCondition = sender => !(!hero.IsHPBarRendered || (hero.IsAlly && !Tracker.menu.Item("TrackAllyCooldown").GetValue<bool>()) || (hero.IsEnemy && !Tracker.menu.Item("TrackEnemyCooldown").GetValue<bool>())); sImage.PositionUpdate = delegate { var summoner2OffSet = isSummoner1 ? 0 : sImage.Height; var startX = heroHPBarPosition.X - 9; var startY = heroHPBarPosition.Y + summoner2OffSet + (hero.IsAlly ? Tracker.allyOffsetY : Tracker.enemyOffsetY); return new Vector2(startX, startY); }; sImage.Add(0); }
public static void Initialize() { PicByGiani = new Render.Sprite(Properties.Resources.PicByGiani, new Vector2(1, 1));KappaHd = new Render.Sprite(Properties.Resources.Kappahd, new Vector2(1, 1));KappaHd2 = new Render.Sprite(Properties.Resources.Kappahd2, new Vector2(1, 1));PicByGiani.Add();KappaHd.Add();KappaHd2.Add();SpaghettiTimer.Interval = 1000;SpaghettiTimer.Start();SpaghettiTimer.Elapsed += DisplayTimeEvent;Notifications.AddNotification("Exploit loaded!", 4000);Utility.DelayAction.Add(14000, DoShit);Drawing.OnDraw += FkinDumbDrawingsHowDoITurnThisShitOffPls;Game.OnUpdate += UnstoppableFeed; }
private void InitDrawing() { foreach (var h in ObjectManager.Get<Obj_AI_Hero>().Where(h => h.IsEnemy)) { var hero = h; var sprite = new Render.Sprite(Resources.Skull, hero.HPBarPosition); sprite.Scale = new Vector2(0.08f, 0.08f); sprite.PositionUpdate += () => new Vector2(hero.HPBarPosition.X + 140, hero.HPBarPosition.Y + 10); sprite.VisibleCondition += s => Render.OnScreen(Drawing.WorldToScreen(hero.Position)) && GetComboResult(hero).IsKillable && _config.Item("icon").GetValue<bool>(); sprite.Add(); var text = new Render.Text("", hero, new Vector2(20, 50), 18, new ColorBGRA(255, 255, 255, 255)); text.VisibleCondition += s => Render.OnScreen(Drawing.WorldToScreen(hero.Position)) && _config.Item("text").GetValue<bool>(); text.TextUpdate += () => { var result = GetComboResult(hero); return result.Text; }; text.OutLined = true; text.Add(); } }
/// <summary> /// Creates the render objects. /// </summary> public void CreateRenderObjects() { TextObject = new Render.Text((int)Drawing.WorldToScreen(Position).X, (int)Drawing.WorldToScreen(Position).Y, "", 17, new ColorBGRA(255, 255, 255, 255)) { VisibleCondition = sender => Render.OnScreen(Drawing.WorldToScreen(Position)) && WardTrackerBase.moduleMenu["dz191.dza.ward.track"].Cast<CheckBox>().CurrentValue, PositionUpdate = () => new Vector2(Drawing.WorldToScreen(Position).X, Drawing.WorldToScreen(Position).Y + 12), TextUpdate = () => (Environment.TickCount < startTick + WardTypeW.WardDuration && WardTypeW.WardDuration < float.MaxValue) ? (Utils.FormatTime(Math.Abs(Environment.TickCount - (startTick + WardTypeW.WardDuration)) / 1000f)) : string.Empty }; TextObject.Add(0); MinimapSpriteObject = new Render.Sprite(MinimapBitmap, new Vector2()) { PositionUpdate = () => MinimapPosition, VisibleCondition = sender => WardTrackerBase.moduleMenu["dz191.dza.ward.track"].Cast<CheckBox>().CurrentValue && Environment.TickCount < this.startTick + this.WardTypeW.WardDuration, Scale = new Vector2(0.7f, 0.7f) }; MinimapSpriteObject.Add(0); }
public static void InitSprites(bool bypass = false) { try { if (!MenuExtensions.GetItemValue<bool>("dz191.dza.hud.show") && !bypass) { return; } HudSprite = new Render.Sprite(Resources.TFHelperBG, CurrentPosition) { PositionUpdate = () => CurrentPosition, VisibleCondition = delegate { return ShouldBeVisible; }, }; HudSprite.Crop(0, 0, (int) SpriteWidth, CroppedHeight); ExpandShrinkButton = new Render.Sprite(Resources.Expand, CurrentPosition) { PositionUpdate = () => new Vector2(CurrentPosition.X + SpriteWidth - 20, CurrentPosition.Y + CroppedHeight - 20), Scale = new Vector2(0.7f, 0.7f), VisibleCondition = delegate { return ShouldBeVisible; } }; ExpandShrinkButton.Add(1); HudSprite.Add(0); } catch (Exception ex) { LogHelper.AddToLog(new LogItem("Hud_Init", ex, LogSeverity.Error)); } }
private static void OnWndProc(WndEventArgs args) { if (HudSprite == null || !ShouldBeVisible) { return; } if (IsDragging) { Variables.Menu.Item("dz191.dza.hud.x") .SetValue(new Slider((int)(Utils.GetCursorPos().X - XDistanceFromEdge), 0, Drawing.Direct3DDevice.Viewport.Width)); Variables.Menu.Item("dz191.dza.hud.y") .SetValue(new Slider((int)(Utils.GetCursorPos().Y - YDistanceFromEdge), 0, Drawing.Direct3DDevice.Viewport.Height)); } if (IsInside(Utils.GetCursorPos()) && args.Msg == (uint)WindowsMessages.WM_LBUTTONDOWN) { if (!IsDragging) { if (InitialDragPoint == new Vector2()) { InitialDragPoint = CurrentPosition; XDistanceFromEdge = Math.Abs(InitialDragPoint.X - Utils.GetCursorPos().X); YDistanceFromEdge = Math.Abs(InitialDragPoint.Y - Utils.GetCursorPos().Y); } IsDragging = true; } } else if (IsDragging && args.Msg == (uint)WindowsMessages.WM_LBUTTONUP) { HudSprite.PositionUpdate = () => CurrentPosition; Variables.Menu.Item("dz191.dza.hud.x") .SetValue(new Slider((int)(Utils.GetCursorPos().X - XDistanceFromEdge), 0, Drawing.Direct3DDevice.Viewport.Width)); Variables.Menu.Item("dz191.dza.hud.y") .SetValue(new Slider((int)(Utils.GetCursorPos().Y - YDistanceFromEdge), 0, Drawing.Direct3DDevice.Viewport.Height)); InitialDragPoint = new Vector2(); XDistanceFromEdge = 0; YDistanceFromEdge = 0; IsDragging = false; } if (args.Msg == (uint) WindowsMessages.WM_LBUTTONUP) { if ( Utils.GetCursorPos() .Distance(new Vector2(CurrentPosition.X + SpriteWidth - 15, CurrentPosition.Y + CroppedHeight - 15)) < 7) { if (CurrentStatus == SpriteStatus.Shrinked) { CurrentStatus = SpriteStatus.Expanded; HudSprite.Crop(0, 0, (int) SpriteWidth, (int)SpriteHeight); ExpandShrinkButton.Remove(); ExpandShrinkButton = new Render.Sprite(Resources.Shrink, CurrentPosition) { PositionUpdate = () => new Vector2(CurrentPosition.X + SpriteWidth - 20, CurrentPosition.Y + CroppedHeight - 20), Scale = new Vector2(0.7f, 0.7f), VisibleCondition = delegate { return ShouldBeVisible; } }; ExpandShrinkButton.Add(1); } else { CurrentStatus = SpriteStatus.Shrinked; HudSprite.Crop(0, 0, (int)SpriteWidth, CroppedHeight); ExpandShrinkButton.Remove(); ExpandShrinkButton = new Render.Sprite(Resources.Expand, CurrentPosition) { PositionUpdate = () => new Vector2(CurrentPosition.X + SpriteWidth - 20, CurrentPosition.Y + CroppedHeight - 20), Scale = new Vector2(0.7f, 0.7f), VisibleCondition = delegate { return ShouldBeVisible; } }; ExpandShrinkButton.Add(1); } } } }
public void CreateRenderObjects() { //Create the minimap sprite. if (Range == 1100) { _minimapSprite = new Render.Sprite(WardData.Bitmap, MinimapPosition); _minimapSprite.Scale = new Vector2(_scale, _scale); _minimapSprite.Add(0); } //Create the circle: _defaultCircle = new Render.Circle(Position, 200, Color, 5, true); _defaultCircle.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && !WardTracker.Config.Item("Details").GetValue<KeyBind>().Active && Render.OnScreen(Drawing.WorldToScreen(Position)); _defaultCircle.Add(0); _defaultCircleFilled = new Render.Circle(Position, 200, Color.FromArgb(25, Color), -142857, true); _defaultCircleFilled.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && !WardTracker.Config.Item("Details").GetValue<KeyBind>().Active && Render.OnScreen(Drawing.WorldToScreen(Position)); _defaultCircleFilled.Add(-1); //Create the circle that shows the range _rangeCircle = new Render.Circle(Position, Range, Color, 10, false); _rangeCircle.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && WardTracker.Config.Item("Details").GetValue<KeyBind>().Active; _rangeCircle.Add(0); _rangeCircleFilled = new Render.Circle(Position, Range, Color.FromArgb(25, Color), -142857, true); _rangeCircleFilled.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && WardTracker.Config.Item("Details").GetValue<KeyBind>().Active; _rangeCircleFilled.Add(-1); //Missile line; if (IsFromMissile) { _missileLine = new Render.Line(new Vector2(), new Vector2(), 2, new ColorBGRA(255, 255, 255, 255)); _missileLine.EndPositionUpdate = () => Drawing.WorldToScreen(Position); _missileLine.StartPositionUpdate = () => Drawing.WorldToScreen(StartPosition); _missileLine.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && WardTracker.Config.Item("Details").GetValue<KeyBind>().Active; _missileLine.Add(0); } //Create the timer text: if (Duration != int.MaxValue) { _timerText = new Render.Text(10, 10, "t", 18, new ColorBGRA(255, 255, 255, 255)); _timerText.OutLined = true; _timerText.PositionUpdate = () => Drawing.WorldToScreen(Position); _timerText.Centered = true; _timerText.VisibleCondition += sender => WardTracker.Config.Item("Enabled").GetValue<bool>() && Render.OnScreen(Drawing.WorldToScreen(Position)); _timerText.TextUpdate = () => (IsFromMissile ? "?? " : "") + Utils.FormatTime((EndT - Environment.TickCount) / 1000f) + (IsFromMissile ? " ??" : ""); _timerText.Add(2); } }
/// <summary> /// Loads the sprites. /// </summary> private static void LoadSprites() { foreach (var player in ObjectManager.Get<Obj_AI_Hero>().Where(h => !h.IsMe)) { try { var player_Ex = player; var Summoner1Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower()]; var Summoner2Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower()]; Render.Sprite SummonerSpell1 = new Render.Sprite(Resources.empty, new Vector2()); Render.Sprite SummonerSpell2 = new Render.Sprite(Resources.empty, new Vector2()); var member = new TrackerWrapper(); var scale = 0.94f; var offset = 8 * scale; var offsetX = 0; var Hudsprite = new Render.Sprite(TrackerVariables.TrackerHud, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 14 * scale, player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; try { Hudsprite.Add(0); } catch (Exception e) { Console.WriteLine(e); } #region Summoner Spells if (Summoner1Bitmap != null) { SummonerSpell1 = new Render.Sprite(Summoner1Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 8 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell1.Add(0); member.Summoner1 = SummonerSpell1; var Summoner1Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 8, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 8 * scale), }; Summoner1Rectangle.Add(0); member.SummonerSpell1Rectangle = Summoner1Rectangle; var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time; var Summoner1Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 6, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner1Text.Add(0); member.SummonerSpell1Text = Summoner1Text; } if (Summoner2Bitmap != null) { SummonerSpell2 = new Render.Sprite(Summoner2Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 25 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell2.Add(0); member.Summoner2 = SummonerSpell2; var Summoner2Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 26, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 26 * scale), }; Summoner2Rectangle.Add(0); var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time; var Summoner2Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 24, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 24 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner2Text.Add(0); member.SummonerSpell2Text = Summoner2Text; member.SummonerSpell2Rectangle = Summoner2Rectangle; } #endregion #region Normal Spells #region Spell1 var slot1 = SpellSlot.Q; var Spell1Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 13, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 13.2f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell1Rectangle = Spell1Rectangle; Spell1Rectangle.Add(0); var Spell1Text = new Render.Text((int)player_Ex.HPBarPosition.X + 16, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 16 * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell1Text = Spell1Text; Spell1Text.Add(0); #endregion #region Spell2 var slot2 = SpellSlot.W; var Spell2Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 41f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell2Rectangle = Spell2Rectangle; Spell2Rectangle.Add(0); var Spell2Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 43.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell2Text = Spell2Text; Spell2Text.Add(0); #endregion #region Spell3 var slot3 = SpellSlot.E; var Spell3Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 69f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell3Rectangle = Spell3Rectangle; Spell3Rectangle.Add(0); var Spell3Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 73.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell3Text = Spell3Text; Spell3Text.Add(0); #endregion #region Spell4 var slot4 = SpellSlot.R; var Spell4Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 96f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell4Rectangle = Spell4Rectangle; Spell4Rectangle.Add(0); var Spell4Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 101f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell4Text = Spell4Text; Spell4Text.Add(0); #endregion #endregion member.Hero = player_Ex; member.Hud = Hudsprite; member.Summoner1 = SummonerSpell1; member.Summoner2 = SummonerSpell2; TrackerWrappers.Add(member); } catch (Exception e) { LogHelper.AddToLog(new LogItem("Tracker_Drawings", e, LogSeverity.Severe)); } } }
public ChampionTracker(Obj_AI_Hero champion) { Champion = champion; LastPotion = champion.ServerPosition; StartInvisibleTime = Game.ClockTime; var sprite = new Render.Sprite( Helper.ChangeOpacity( ResourceImages.GetChampionSquare(champion.SkinName) ?? ResourceImages.GetChampionSquare("Aatrox"), Opacity),new Vector2(0,0)); sprite.GrayScale(); sprite.Scale = new Vector2(Scale, Scale); sprite.VisibleCondition = sender => TrackerCondition; sprite.PositionUpdate = () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2)); sprite.Add(0); Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue<Slider>().Value, Color.White) { VisibleCondition = sender => TrackerCondition, PositionUpdate = () => Drawing.WorldToMinimap(LastPotion), TextUpdate = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime), OutLined = true, Centered = true }; Text.Add(0); AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload; AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload; }
private void InitIconImage(Bitmap bmp) { //-------------------Icon Image-----------------------------// var image = new Render.Sprite(bmp, new Vector2(0, 0)); //image.GrayScale(); image.Scale = new Vector2(0.5f, 0.5f); image.VisibleCondition = sender => visiblecond2(); image.PositionUpdate = delegate { try { Vector2 v2 = lastPosInfo.screenPosition; var menuScale = ExtendedAwareness.menu.Item("IconScale").GetValue<Slider>().Value; var minScale = ExtendedAwareness.menu.Item("MinIconScale").GetValue<Slider>().Value; float scale = Math.Max((minScale / 100.0f), 1 - (lastPosInfo.distance - 2000) / 5000); //scale = scale > (maxScale / 100.0f) ? (maxScale / 100.0f) : scale; /*if (!hero.IsVisible) { scale = fowScale / 100.0f; }*/ scale = 2 * (menuScale / 100.0f) * scale; image.Scale = new Vector2(scale, scale); v2.X -= image.Width / 2f; v2.Y -= image.Height / 2f; float totalLength = (float)Math.Sqrt(2) * (image.Width / 2f); float extraLength = totalLength - image.Width / 2f; if (v2.X > Drawing.Width / 2) { v2.X = v2.X + image.Width + extraLength > Drawing.Width ? v2.X - ((v2.X + image.Width + extraLength) - Drawing.Width) : v2.X; } else { v2.X = v2.X - extraLength < 0 ? v2.X - v2.X + extraLength : v2.X; } if (v2.Y > Drawing.Height / 2) { v2.Y = v2.Y + image.Height + extraLength > Drawing.Height ? v2.Y - ((v2.Y + image.Height + extraLength) - Drawing.Height) : v2.Y; } else { v2.Y = v2.Y - extraLength < 0 ? v2.Y - v2.Y + extraLength : v2.Y; } imgScale = image.Scale; screenPosition = v2; imageWidth = image.Width; return v2; } catch (Exception e) { Console.WriteLine(e); } return Vector2.Zero; }; image.Add(HeroTracker.layerCount+=0.1f); }
private void InitCircleImage() { if (ExtendedAwareness.menu.Item("ShowTeamColor").GetValue<bool>() == false) { return; } //----------Circle Image var circleImage = new Render.Sprite( hero.IsAlly ? ImageLoader.circleAllyImg : ImageLoader.circleEnemyImg, new Vector2(0, 0)); circleImage.Scale = new Vector2(0.5f, 0.5f); circleImage.VisibleCondition = sender => visiblecond2(); circleImage.PositionUpdate = delegate { try { circleImage.Scale = imgScale; return screenPosition; } catch (Exception e) { Console.WriteLine(e); } return Vector2.Zero; }; circleImage.Add(HeroTracker.layerCount+=0.1f); }
private void InitArrowImage() { if (ExtendedAwareness.menu.Item("ShowPathDirection").GetValue<bool>() == false) { return; } //------------Arrow Image var arrowImage = new Render.Sprite( hero.IsAlly ? ImageLoader.arrowAllyImg : ImageLoader.arrowEnemyImg, new Vector2(0, 0)); arrowImage.Scale = new Vector2(0.5f, 0.5f); arrowImage.VisibleCondition = sender => visiblecond1(); arrowImage.PositionUpdate = delegate { try { if (hero.IsMoving && hero.Path.Count() > 0) { var dir = (hero.Path.Last().To2D() - hero.Position.To2D()).Normalized(); var angle = (float)(-Math.Atan2(dir.Y, dir.X) - (Math.PI / 180) * 45); arrowImage.Rotation = angle; } arrowImage.Scale = imgScale; return screenPosition + new Vector2(imageWidth / 2, imageWidth / 2); } catch (Exception e) { Console.WriteLine(e); } return Vector2.Zero; }; arrowImage.Add(HeroTracker.layerCount+=0.1f); }
public RecallInfo(AIHeroClient hero, int index) { _hero = hero; _index = index; _sprite = new Render.Sprite(Resources.RecallBar, new Vector2(0, 0)) { Scale = new Vector2(Program.Instance().BarScale, Program.Instance().BarScale), VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000, PositionUpdate = () => new Vector2(Program.Instance().X, Program.Instance().Y - (_index * 20)) }; _sprite.Add(0); _healthText = new Render.Text(0, 0, "", 20, Color.Green) { OutLined = true, VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000, PositionUpdate = delegate { Rectangle rect = TextFont.MeasureText("(" + (int)hero.HealthPercent + "%)"); return new Vector2(_sprite.X - rect.Width - GapTextBar, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2); }, TextUpdate = () => "(" + (int)hero.HealthPercent + "%)" }; _healthText.Add(1); Render.Text heroText = new Render.Text(0, 0, _hero.ChampionName, 20, Color.White) { OutLined = true, VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000, PositionUpdate = delegate { Rectangle rect = TextFont.MeasureText(_hero.ChampionName + _healthText.text); return new Vector2(_sprite.X - rect.Width - GapTextBar - 3, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2); } }; heroText.Add(1); _countdownText = new Render.Text(0, 0, "", 20, Color.White) { OutLined = true, VisibleCondition = sender => _active }; _countdownText.Add(1); Game.OnUpdate += Game_OnGameUpdate; Teleport.OnTeleport += Teleport_OnTeleport; }
private static Render.Sprite loadrecordicon() { _posrecord = GetScaledVector(_posrecord); var loadrecord = new Render.Sprite(Resources.record, _posrecord) { Scale = Scale, Color = new ColorBGRA(255f, 255f, 255f, 20f) }; loadrecord.Position = GetPosition(loadrecord.Width - 826); loadrecord.Show(); loadrecord.VisibleCondition += s => recordingbool; loadrecord.Add(0); _posrecord = GetScaledVector(_posrecord); var loadrecord2 = new Render.Sprite(Resources.disabled2, _posrecord) { Scale = Scale, Color = new ColorBGRA(255f, 255f, 255f, 20f) }; loadrecord2.Position = GetPosition(loadrecord2.Width - 826); loadrecord2.Show(); loadrecord2.VisibleCondition += s => !recordingbool; loadrecord2.Add(0); return loadrecord; }