Terraria.ModLoader.ModSurfaceBgStyle

Each background style determines in its own way how exactly the background is drawn. This class serves as a collection of functions for above-ground backgrounds.

Methods

Autoload(System.String@)()
Allows you to automatically add a ModSurfaceBgStyle instead of using Mod.AddSurfaceBgStyle. 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 ModSurfaceBgStyle.
ChooseBgStyle()
Whether or not the conditions have been met for this background style to draw its backgrounds. Returns false by default.
ModifyFarFades(System.Single[],System.Single)()
Allows you to modify the transparency of all background styles that exist. In general, you should move the index equal to this style's slot closer to 1, and all other indexes closer to 0. The transitionSpeed parameter is what you should add/subtract to each element of the fades parameter. See the ExampleMod for an example.
ChooseFarTexture()
Allows you to determine which texture is drawn in the very back of the background. Mod.GetBackgroundSlot may be useful here, as well as for the other texture-choosing hooks.
ChooseMiddleTexture()
Allows you to determine which texture is drawn in the middle of the background.
PreDrawCloseBackground(Microsoft.Xna.Framework.Graphics.SpriteBatch)()
Gives you complete freedom over how the closest part of the background is drawn. Return true for ChooseCloseTexture to have an effect; return false to disable tModLoader's own code for drawing the close background.
ChooseCloseTexture(System.Single@,System.Double@,System.Single@,System.Single@)()
Allows you to determine which texture is drawn in the closest part of the background. This also lets you modify the scale and parallax (as well as two unfortunately-unknown parameters).