Table of Contents

Class TextureHandler

Namespace
TinyLife.Utilities
Assembly
Tiny Life.dll

The texture handler stores data for the game's textures, including all of the game's internal textures and various utility methods. It also stores the game's MLEM.Data.RuntimeTexturePacker which is used to pack all textures into a big texture for performance.

public static class TextureHandler
Inheritance
TextureHandler
Inherited Members

Fields

ClothesTextures

public static readonly Dictionary<(string, ClothesLayer), Dictionary<Point, TextureRegion>> ClothesTextures

Field Value

Dictionary<(string, ClothesLayer), Dictionary<Point, TextureRegion>>

FurnitureTextures

public static readonly List<DataTextureAtlas> FurnitureTextures

Field Value

List<DataTextureAtlas>

TexturePacker

public static readonly RuntimeTexturePacker TexturePacker

Field Value

RuntimeTexturePacker

Properties

AutoTileTexture

public static Dictionary<Point, TextureRegion> AutoTileTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

CursorTexture

public static UniformTextureAtlas CursorTexture { get; }

Property Value

UniformTextureAtlas

EmoteTexture

public static Dictionary<Point, TextureRegion> EmoteTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

FenceTextures

public static Dictionary<Point, TextureRegion> FenceTextures { get; }

Property Value

Dictionary<Point, TextureRegion>

LightTexture

public static UniformTextureAtlas LightTexture { get; }

Property Value

UniformTextureAtlas

OpeningTexture

public static Dictionary<Point, TextureRegion> OpeningTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

ParticleTexture

public static UniformTextureAtlas ParticleTexture { get; }

Property Value

UniformTextureAtlas

RoofTexture

public static Dictionary<Point, TextureRegion> RoofTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

StairsTextures

public static Dictionary<Point, TextureRegion> StairsTextures { get; }

Property Value

Dictionary<Point, TextureRegion>

TileHeight

The height of each tile, in pixels

public static int TileHeight { get; }

Property Value

int

TileScale

The factor that the current textures' tile size is increased or decreased by, based on the default value of 32x16 pixels.

public static float TileScale { get; }

Property Value

float

TileTexture

public static Dictionary<Point, TextureRegion> TileTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

TileWidth

The width of each tile, in pixels

public static int TileWidth { get; }

Property Value

int

UiTexture

public static Dictionary<Point, TextureRegion> UiTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

VehicleTexture

public static DataTextureAtlas VehicleTexture { get; }

Property Value

DataTextureAtlas

WallpaperTextures

public static Dictionary<Point, TextureRegion> WallpaperTextures { get; }

Property Value

Dictionary<Point, TextureRegion>

WaterTexture

public static Dictionary<Point, TextureRegion> WaterTexture { get; }

Property Value

Dictionary<Point, TextureRegion>

Events

OnGameContentLoaded

An event that is invoked when the base game has just loaded a Microsoft.Xna.Framework.Graphics.Texture2D through a Microsoft.Xna.Framework.Content.ContentManager. This event can be used by mods to change what textures the game uses.

public static event TextureHandler.GameContentLoadedDelegate OnGameContentLoaded

Event Type

TextureHandler.GameContentLoadedDelegate

OnLoadGameContent

An event that is invoked when the base game loads textures to be packed or otherwise used. This event can be used by mods to change what textures the game uses by changing the Microsoft.Xna.Framework.Content.ContentManager and/or the path of the texture to load.

public static event TextureHandler.LoadGameContentDelegate OnLoadGameContent

Event Type

TextureHandler.LoadGameContentDelegate