tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.GlobalBgStyle 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...

Public Member Functions

virtual bool Autoload (ref string name)
 Allows you to automatically add a GlobalBgStyle instead of using Mod.AddGlobalBgStyle. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this to either force or stop an autoload, or change the name that identifies this type of GlobalBgStyle. More...
 
virtual void ChooseSurfaceBgStyle (ref int style)
 Allows you to change which surface background style is being used. More...
 
virtual void ChooseUgBgStyle (ref int style)
 Allows you to change which underground background style is being used. More...
 
virtual void FillUgTextureArray (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...
 

Properties

Mod mod [get, set]
 That mod that added this global background style. More...
 
string Name [get, set]
 The internal name of this global background style. 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.

Definition at line 139 of file ModBackgroundStyle.cs.

Member Function Documentation

◆ Autoload()

virtual bool Terraria.ModLoader.GlobalBgStyle.Autoload ( ref string  name)
virtual

Allows you to automatically add a GlobalBgStyle instead of using Mod.AddGlobalBgStyle. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this to either force or stop an autoload, or change the name that identifies this type of GlobalBgStyle.

Definition at line 160 of file ModBackgroundStyle.cs.

160 {
161 return mod.Properties.Autoload;
162 }
Mod mod
That mod that added this global background style.
ModProperties Properties
Definition: Mod.cs:52
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...

References Terraria.ModLoader.ModProperties.Autoload, Terraria.ModLoader.GlobalBgStyle.mod, and Terraria.ModLoader.Mod.Properties.

Referenced by Terraria.ModLoader.Mod.AutoloadGlobalBgStyle().

+ Here is the caller graph for this function:

◆ ChooseSurfaceBgStyle()

virtual void Terraria.ModLoader.GlobalBgStyle.ChooseSurfaceBgStyle ( ref int  style)
virtual

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

Definition at line 173 of file ModBackgroundStyle.cs.

173 {
174 }

◆ ChooseUgBgStyle()

virtual void Terraria.ModLoader.GlobalBgStyle.ChooseUgBgStyle ( ref int  style)
virtual

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

Definition at line 167 of file ModBackgroundStyle.cs.

167 {
168 }

◆ FillUgTextureArray()

virtual void Terraria.ModLoader.GlobalBgStyle.FillUgTextureArray ( 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.

Definition at line 179 of file ModBackgroundStyle.cs.

179 {
180 }

◆ ModifyFarSurfaceFades()

virtual void Terraria.ModLoader.GlobalBgStyle.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.

Definition at line 185 of file ModBackgroundStyle.cs.

185 {
186 }

Property Documentation

◆ mod

Mod Terraria.ModLoader.GlobalBgStyle.mod
getset

That mod that added this global background style.

Definition at line 144 of file ModBackgroundStyle.cs.

144 {
145 get;
146 internal set;
147 }

Referenced by Terraria.ModLoader.GlobalBgStyle.Autoload().

◆ Name

string Terraria.ModLoader.GlobalBgStyle.Name
getset

The internal name of this global background style.

Definition at line 152 of file ModBackgroundStyle.cs.

152 {
153 get;
154 internal set;
155 }

Referenced by Terraria.ModLoader.Mod.AutoloadGlobalBgStyle().