private void Drawing_OnDraw(EventArgs args) { if (!IsStacking || !IsValid) { return; } campNameTextPosition = HUDInfo.GetHPbarPosition(Unit) + new Vector2((GetHpBarSizeX - MeasureCampNameTextSize.X) / 2, IsHero ? 25 : 0); if (campNameTextPosition.IsZero) { return; } var text = CurrentCamp.Name; if (Debug) { text += " (" + CurrentStatus + ")"; } var campName = new DrawText { Position = campNameTextPosition, Text = text, Color = Color.White, TextSize = new Vector2(16) }; if (IsUnderCampNameText && !IsHero) { campName.Color = Color.Orange; } campName.Draw(); }
/// <summary> /// The on draw. /// </summary> /// <param name="args"> /// The args. /// </param> private static void OnDraw(EventArgs args) { if (!MenuSettings.DrawMenu || Config.DisableDrawings) { return; } Menu draggedMenu = null; var bgsize = new Vector2(4, (float)(MenuSettings.MenuItemHeight / 1.2)); Drawing.DrawRect( MenuSettings.BasePosition - new Vector2(MenuSettings.MenuItemHeight / 7, bgsize.Y - bgsize.X), new Vector2( MenuSettings.MenuWidth + MenuSettings.MenuItemHeight + MenuSettings.MenuItemHeight / 7, MenuSettings.MenuItemHeight * menuCount + bgsize.Y - bgsize.X), Root.SelectedTheme.RootMenuBackgroundColor); MenuPanel.Position = MenuSettings.BasePosition - new Vector2(MenuSettings.MenuItemHeight / 7, bgsize.Y - 1); MenuPanel.Size = new Vector2( MenuSettings.MenuWidth + MenuSettings.MenuItemHeight + MenuSettings.MenuItemHeight / 7, bgsize.Y); MenuPanel.Color = Root.SelectedTheme.TopPanelBackgroundColor; MenuPanel.Draw(); PanelText.Color = Root.SelectedTheme.TopPanelTextColor; PanelText.TextSize = new Vector2((float)(MenuSettings.MenuItemHeight * 0.5)); PanelText.CenterOnRectangleHorizontally(MenuPanel, (float)(MenuSettings.MenuItemHeight * 0.26)); PanelText.Draw(); foreach (var rootMenu in RootMenus.OrderBy(x => x.Value.OrderNumber)) { if (rootMenu.Value.BeingDragged) { draggedMenu = rootMenu.Value; continue; } rootMenu.Value.Drawing_OnDraw(args); } if (draggedMenu == null) { return; } draggedMenu.Drawing_OnDraw(args); }
private void Drawing_OnDraw(EventArgs args) { if (!this.IsStacking || !this.IsValid) { return; } var hpBar = HUDInfo.GetHPbarPosition(this.Unit) + new Vector2(10, 0); if (hpBar.IsZero) { return; } var text = new DrawText { Position = hpBar, Text = this.CurrentCamp.Name, Color = Color.White, TextSize = new Vector2(15) }; text.Draw(); }