TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.BossBarLoader Class Reference
+ Collaboration diagram for Terraria.ModLoader.BossBarLoader:

Static Public Member Functions

static Asset< Texture2D > GetTexture (ModBossBar bossBar)
 Returns the texture that the given bar is using. If it does not have a custom one, it returns the vanilla texture.
 
static bool NpcToBossBar (NPC npc, out ModBossBar value)
 Gets the ModBossBar associated with this NPC.
 
static bool PreDraw (SpriteBatch spriteBatch, BigProgressBarInfo info, ref BossBarDrawParams drawParams)
 
static void PostDraw (SpriteBatch spriteBatch, BigProgressBarInfo info, BossBarDrawParams drawParams)
 
static void DrawFancyBar_TML (SpriteBatch spriteBatch, BossBarDrawParams drawParams)
 Draws a healthbar with fixed barTexture dimensions (516x348) where the effective bar top left starts at 32x24, and is 456x22 big.
 

Static Package Functions

static void Unload ()
 
static void AddBossBar (ModBossBar bossBar)
 
static void AddGlobalBossBar (GlobalBossBar globalBossBar)
 
static void AddBossBarStyle (ModBossBarStyle bossBarStyle)
 
static void SwitchBossBarStyle (ModBossBarStyle bossBarStyle)
 Sets the pending style that should be switched to.
 
static void GotoSavedStyle ()
 Sets the saved style that should be switched to, handles possibly unloaded/invalid ones and defaults to the vanilla style.
 
static void HandleStyle ()
 Checks if the style was changed and applies it, saves the config if required.
 
static string InsertMenu (out Action onClick)
 Inserts the boss bar style select option into the main and in-game menu under the "Interface" category.
 

Static Package Attributes

static ? BigProgressBarInfo drawingInfo = null
 Set to the current info that is being drawn just before any registered bar draws through the vanilla system (modded and vanilla), reset in the method used to draw it.
 
static readonly ModBossBarStyle vanillaStyle = new DefaultBossBarStyle()
 
static string lastSelectedStyle = CurrentStyle.FullName
 The string that is saved in the config.
 
static readonly IList< ModBossBarbossBars = new List<ModBossBar>()
 
static readonly IList< GlobalBossBarglobalBossBars = new List<GlobalBossBar>()
 
static readonly List< ModBossBarStylebossBarStyles = new List<ModBossBarStyle> { vanillaStyle }
 
static readonly int defaultStyleCount = bossBarStyles.Count
 
static readonly Dictionary< int, Asset< Texture2D > > bossBarTextures = new Dictionary<int, Asset<Texture2D>>()
 Only contains textures that exist.
 

Properties

static Asset< Texture2D > VanillaBossBarTexture [get]
 
static ModBossBarStyle CurrentStyle = vanillaStyle [get, private set]
 

Static Private Attributes

static Asset< Texture2D > vanillaBossBarTexture
 
static bool styleLoading = true
 Used to prevent switching to the default style while the mods are loading (The code responsible for it runs in the main menu too)
 
static ModBossBarStyle switchToStyle = null
 

Detailed Description

Definition at line 14 of file BossBarLoader.cs.


The documentation for this class was generated from the following file: