Terraria ModLoader  0.10.1.5
A framework for Terraria mods
Terraria.ModLoader.BackgroundTextureLoader Class Reference

This is the class that keeps track of all modded background textures and their slots/IDs. More...

+ Collaboration diagram for Terraria.ModLoader.BackgroundTextureLoader:

Static Public Member Functions

static int GetBackgroundSlot (string texture)
 Returns the slot/ID of the background texture with the given name. More...
 

Public Attributes

const int vanillaBackgroundTextureCount = Main.maxBackgrounds
 

Static Private Attributes

static int nextBackground = vanillaBackgroundTextureCount
 

Detailed Description

This is the class that keeps track of all modded background textures and their slots/IDs.

Definition at line 10 of file BackgroundTextureLoader.cs.

Member Function Documentation

static int Terraria.ModLoader.BackgroundTextureLoader.GetBackgroundSlot ( string  texture)
static

Returns the slot/ID of the background texture with the given name.

Definition at line 25 of file BackgroundTextureLoader.cs.

References Terraria.ModLoader.ModContent.GetTexture().

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

25  {
26  if (backgrounds.ContainsKey(texture)) {
27  return backgrounds[texture];
28  }
29  else {
30  return -1;
31  }
32  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int Terraria.ModLoader.BackgroundTextureLoader.nextBackground = vanillaBackgroundTextureCount
staticprivate

Definition at line 13 of file BackgroundTextureLoader.cs.

const int Terraria.ModLoader.BackgroundTextureLoader.vanillaBackgroundTextureCount = Main.maxBackgrounds

Definition at line 12 of file BackgroundTextureLoader.cs.