tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.ModLoader.GlobalBackgroundStyle Class Reference

This class serves to collect functions that operate on any kind of background style, without being specific to one single background style. More...

Inherits Terraria.ModLoader.ModType.

Public Member Functions

virtual void ChooseSurfaceBackgroundStyle (ref int style)
 Allows you to change which surface background style is being used. More...
 
virtual void ChooseUndergroundBackgroundStyle (ref int style)
 Allows you to change which underground background style is being used. More...
 
virtual void FillUndergroundTextureArray (int style, int[] textureSlots)
 Allows you to change which textures make up the underground background by assigning their background slots/IDs to the given array. Index 0 is the texture on the border of the ground and sky layers. Index 1 is the texture drawn between rock and ground layers. Index 2 is the texture on the border of ground and rock layers. Index 3 is the texture drawn in the rock layer. The border images are 160x16 pixels, and the others are 160x96, but it seems like the right 32 pixels of each is a duplicate of the far left 32 pixels. More...
 
virtual void ModifyFarSurfaceFades (int style, float[] fades, float transitionSpeed)
 Allows you to modify the transparency of all background styles that exist. The style parameter is the current style that is being used. More...
 
sealed override void SetupContent ()
 If you make a new ModType, seal this override, and call SetStaticDefaults in it. More...
 
- Public Member Functions inherited from Terraria.ModLoader.ModType
virtual bool IsLoadingEnabled (Mod mod)
 Allows you to stop Mod.AddContent from actually adding this content. Useful for items that can be disabled by a config. More...
 
virtual void Load ()
 Allows you to perform one-time loading tasks. Beware that mod content has not finished loading here, things like ModContent lookup tables or ID Sets are not fully populated. More...
 
virtual void SetStaticDefaults ()
 Allows you to modify the properties after initial loading has completed. More...
 
virtual void Unload ()
 Allows you to safely unload things you added in Load. More...
 

Protected Member Functions

override sealed void Register ()
 If you make a new ModType, seal this override. More...
 

Additional Inherited Members

- Properties inherited from Terraria.ModLoader.ModType
string FullName [get]
 The internal name of this, including the mod it is from. More...
 
Mod Mod [get, set]
 The mod this belongs to. More...
 
virtual string Name [get]
 The internal name of this. More...
 
- Properties inherited from Terraria.ModLoader.IModType
string FullName [get]
 => $"{Mod.Name}/{Name}" More...
 
Mod Mod [get]
 The mod this belongs to. More...
 
string Name [get]
 The internal name of this instance. More...
 

Detailed Description

This class serves to collect functions that operate on any kind of background style, without being specific to one single background style.

Member Function Documentation

◆ ChooseSurfaceBackgroundStyle()

virtual void Terraria.ModLoader.GlobalBackgroundStyle.ChooseSurfaceBackgroundStyle ( ref int  style)
virtual

Allows you to change which surface background style is being used.

◆ ChooseUndergroundBackgroundStyle()

virtual void Terraria.ModLoader.GlobalBackgroundStyle.ChooseUndergroundBackgroundStyle ( ref int  style)
virtual

Allows you to change which underground background style is being used.

◆ FillUndergroundTextureArray()

virtual void Terraria.ModLoader.GlobalBackgroundStyle.FillUndergroundTextureArray ( int  style,
int[]  textureSlots 
)
virtual

Allows you to change which textures make up the underground background by assigning their background slots/IDs to the given array. Index 0 is the texture on the border of the ground and sky layers. Index 1 is the texture drawn between rock and ground layers. Index 2 is the texture on the border of ground and rock layers. Index 3 is the texture drawn in the rock layer. The border images are 160x16 pixels, and the others are 160x96, but it seems like the right 32 pixels of each is a duplicate of the far left 32 pixels.

◆ ModifyFarSurfaceFades()

virtual void Terraria.ModLoader.GlobalBackgroundStyle.ModifyFarSurfaceFades ( int  style,
float[]  fades,
float  transitionSpeed 
)
virtual

Allows you to modify the transparency of all background styles that exist. The style parameter is the current style that is being used.

◆ Register()

override sealed void Terraria.ModLoader.GlobalBackgroundStyle.Register ( )
protectedvirtual

If you make a new ModType, seal this override.

Implements Terraria.ModLoader.ModType.

◆ SetupContent()

sealed override void Terraria.ModLoader.GlobalBackgroundStyle.SetupContent ( )
virtual

If you make a new ModType, seal this override, and call SetStaticDefaults in it.

Reimplemented from Terraria.ModLoader.ModType.