private static void DrawingOnOnEndScene(EventArgs args) { if (!Active) { return; } if (Drawing.Direct3DDevice == null || Drawing.Direct3DDevice.IsDisposed) { return; } foreach (var w in WarningSpellList.Where(w => w.StartTime + 2000 > Environment.TickCount)) { CommonGeometry.DrawText(CommonGeometry.TextWarning, "WARNING! " + w.ChampionName + " casted " + w.SpellSlot + "!", Drawing.Width * 0.22f, Drawing.Height * 0.44f, SharpDX.Color.White); } //CommonGeometry.DrawText(CommonGeometry.TextPassive, time, position.X - 50 + 105, +position.Y - 52, SharpDX.Color.AntiqueWhite) }
private void DrawingOnOnEndScene(EventArgs args) { if (Drawing.Direct3DDevice == null || Drawing.Direct3DDevice.IsDisposed) { return; } //var outline = Menu.Item(Menu.Name + "DrawingOutline").GetValue<bool>(); //var offsetTop = Menu.Item(Menu.Name + "DrawingOffsetTop").GetValue<Slider>().Value; //var offsetLeft = Menu.Item(Menu.Name + "DrawingOffsetLeft").GetValue<Slider>().Value; foreach (var ability in ObjectDrawings.Where(d => d.Object.IsValid && d.Position.IsOnScreen() && d.EndTime > Game.Time)) { var position = Drawing.WorldToScreen(ability.Position); var time = (ability.EndTime - Game.Time).ToString("0.0"); CommonGeometry.DrawBox(new Vector2(position.X - 50, position.Y - 50), 100, 8, Color.Transparent, 1, Color.Black); var buffTime = ability.EndTime - Game.Time; float percent = (Math.Abs(ability.EndTime - ability.StartTime) > float.Epsilon) ? buffTime / (ability.EndTime - ability.StartTime) : 1f; //Chat.Print(percent.ToString()); int n = (buffTime > 0) ? (int)(100 * (1f - percent)) : 100; string s = string.Format(buffTime < 1f ? "{0:0.0}" : "{0:0}", buffTime); CommonGeometry.DrawBox(new Vector2(position.X - 50 + 1, position.Y - 50 + 1), n, 6, ability.Color, 1, Color.Transparent); CommonGeometry.DrawText(CommonGeometry.TextPassive, time, position.X - 50 + 105, +position.Y - 52, SharpDX.Color.AntiqueWhite); //if (outline) //{ // _text.DrawText(null, time, (int)position.X + 1 + offsetLeft, (int)position.Y + 1 + offsetTop, Color.Black); // _text.DrawText(null, time, (int)position.X - 1 + offsetLeft, (int)position.Y - 1 + offsetTop, Color.Black); // _text.DrawText(null, time, (int)position.X + 1 + offsetLeft, (int)position.Y + offsetTop, Color.Black); // _text.DrawText(null, time, (int)position.X - 1 + offsetLeft, (int)position.Y + offsetTop, Color.Black); //} //_text.DrawText(null, time, (int)position.X + offsetLeft, (int)position.Y + offsetTop, ability.Color); } }