Table of Contents

Class ContainedTextureSource

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Helper class for implementors of ITexPositionSource Open in GitHub

public class ContainedTextureSource : ITexPositionSource
Inheritance
ContainedTextureSource
Implements
Inherited Members
Extension Methods

Constructors

ContainedTextureSource(ICoreClientAPI, ITextureAtlasAPI, Dictionary<string, AssetLocation>, string)

public ContainedTextureSource(ICoreClientAPI capi, ITextureAtlasAPI targetAtlas, Dictionary<string, AssetLocation> textures, string sourceForErrorLogging)

Parameters

capi ICoreClientAPI
targetAtlas ITextureAtlasAPI
textures Dictionary<string, AssetLocation>
sourceForErrorLogging string

Fields

Textures

public readonly Dictionary<string, AssetLocation> Textures

Field Value

Dictionary<string, AssetLocation>

capi

protected readonly ICoreClientAPI capi

Field Value

ICoreClientAPI

sourceForErrorLogging

protected readonly string sourceForErrorLogging

Field Value

string

targetAtlas

protected readonly ITextureAtlasAPI targetAtlas

Field Value

ITextureAtlasAPI

Properties

AtlasSize

This returns the size of the atlas this texture resides in.

public Size2i AtlasSize { get; }

Property Value

Size2i

this[string]

public TextureAtlasPosition this[string textureCode] { get; }

Parameters

textureCode string

Property Value

TextureAtlasPosition

Methods

getOrCreateTexPos(AssetLocation)

protected virtual TextureAtlasPosition getOrCreateTexPos(AssetLocation texturePath)

Parameters

texturePath AssetLocation

Returns

TextureAtlasPosition