public static AnkhHUD CreateDefault() { var mymod = NecrotisMod.Instance; Texture2D bgTex = mymod.GetTexture("HUD/AnkhBG"); Vector2 pos = AnkhHUD.GetBaseHudUncomputedPosition(); Vector2 dim = new Vector2(bgTex.Width, bgTex.Height); return(new AnkhHUD(pos, dim)); }
//////////////// private AnkhHUD(Vector2 pos, Vector2 dim) : base("Anima Gauge", pos, dim) { var mymod = NecrotisMod.Instance; this.AnkhDripSource = mymod.GetTexture("HUD/AnkhDripSource"); this.AnkhBgTex = mymod.GetTexture("HUD/AnkhBG"); this.AnkhFgTex = mymod.GetTexture("HUD/AnkhFG"); this.AnkhGlowTex = mymod.GetTexture("HUD/AnkhGlow"); this.AnkhUnglowTex = mymod.GetTexture("HUD/AnkhUnglow"); this.AnkhOhmTex = mymod.GetTexture("HUD/AnkhOhm"); AnkhHUD.PremultiplyTexture(this.AnkhDripSource); AnkhHUD.PremultiplyTexture(this.AnkhGlowTex); AnkhHUD.PremultiplyTexture(this.AnkhUnglowTex); }
//////////////// private void DrawHoverTooltipIf(SpriteBatch sb, float animaPercent, float animaPercentChangeRate) { if (this.IsShowingDefaultHoverText) { return; } string text = AnkhHUD.GetGeneralHoverText(animaPercent, animaPercentChangeRate); Utils.DrawBorderStringFourWay( sb: sb, font: Main.fontMouseText, text: text, x: Main.MouseScreen.X, y: Main.MouseScreen.Y + 24f, textColor: animaPercent > 0.5f ? new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor) : new Color(Main.mouseTextColor, 0, 0), borderColor: Color.Black, origin: default(Vector2) ); }