Show / Hide Table of Contents

Class UserTexture

Holds the texture bytes for saving and displaying user textures, used by ViewTextureToImage on the client to display texture on UI.

Inheritance
System.Object
SimpleEntry
UserTexture
Implements
ILinkableParameterized<System.Boolean>
ILinkableParameterized<SimpleEntry.NamingOptions>
ILinkable
IValidity
ICachesValidity
IHasID
INamed
IReInitializable
IHasReferenceableSerializableID
IHasSerializableID
System.ComponentModel.INotifyPropertyChanged
IDescribable
ISuffixName
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasReputation
IReputationAssociated
IController
IViewController
IHasUniversalID
IGeneratesCulture
Inherited Members
SimpleEntry.Description()
SimpleEntry.PostLoad()
SimpleEntry.CreatorText(Player)
SimpleEntry.ToString()
SimpleEntry.SaveInRegistrar()
SimpleEntry.UILinkContent(Boolean)
SimpleEntry.UILinkContent(SimpleEntry.NamingOptions)
SimpleEntry.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
SimpleEntry.ReInitialize()
SimpleEntry.MarkDirty()
SimpleEntry.UserDescription
SimpleEntry.Name
SimpleEntry.Creator
SimpleEntry.NameSuffix
SimpleEntry.CreationTime
SimpleEntry.CachedValidity
SimpleEntry.IsDestroyed
SimpleEntry.OnValidityChanged
SimpleEntry.Initialized
SimpleEntry.MarkedUpName
SimpleEntry.Id
SimpleEntry.IconName
SimpleEntry.Registrar
SimpleEntry.WorldTimeSinceCreation
SimpleEntry.CanBeDeleted
SimpleEntry.TextName
SimpleEntry.Scannable
SimpleEntry.Style
SimpleEntry.ControllerID
SimpleEntry.TrueResult
SimpleEntry.Subscriptions
SimpleEntry.PropertyChanged
Namespace: Eco.Gameplay.Systems.UserTextures
Assembly: Eco.Gameplay.dll
Syntax
public class UserTexture : SimpleEntry, ILinkableParameterized<bool>, ILinkableParameterized<SimpleEntry.NamingOptions>, ILinkable, IValidity, ICachesValidity, IHasID, INamed, IReInitializable, IHasReferenceableSerializableID, IHasSerializableID, INotifyPropertyChanged, IDescribable, ISuffixName, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasReputation, IReputationAssociated, IController, IViewController, IHasUniversalID, IGeneratesCulture

Constructors

UserTexture(Byte[], User, Boolean)

Declaration
public UserTexture(byte[] bytes, User user, bool allowEmbeddingInText)
Parameters
Type Name Description
System.Byte[] bytes
User user
System.Boolean allowEmbeddingInText

Fields

FileName

Declaration
public string FileName
Field Value
Type Description
System.String

Init

Declaration
public Initializer Init
Field Value
Type Description
Initializer

Properties

AllowEmbeddingInText

Declaration
public bool AllowEmbeddingInText { get; }
Property Value
Type Description
System.Boolean

CachedArtworkValue

The value when placed in its current settlement. If no settlement is assigned, it stays at zero.

Declaration
public ValResult<float> CachedArtworkValue { get; set; }
Property Value
Type Description
ValResult<System.Single>

Holder

Declaration
public WorldObject Holder { get; set; }
Property Value
Type Description
WorldObject

IsEmpty

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

IsReviewed

Declaration
public bool IsReviewed { get; }
Property Value
Type Description
System.Boolean

NeedTMPIcon

Declaration
public bool NeedTMPIcon { get; set; }
Property Value
Type Description
System.Boolean

Reputation

Declaration
public float Reputation { get; }
Property Value
Type Description
System.Single

ReviewState

Declaration
public TextureReviewState ReviewState { get; }
Property Value
Type Description
TextureReviewState

TextureData

Declaration
public byte[] TextureData { get; }
Property Value
Type Description
System.Byte[]

TextureHolder

Declaration
public WorldObject TextureHolder { get; }
Property Value
Type Description
WorldObject

TexturePreview

Declaration
public byte[] TexturePreview { get; }
Property Value
Type Description
System.Byte[]

Methods

ComputeArtworkValue(Player, Settlement)

Do a query to see what the value of this texture would be in the given settlement, since value depends on citizenship of the reputation givers.

Declaration
public LocString ComputeArtworkValue(Player player, Settlement settlement)
Parameters
Type Name Description
Player player
Settlement settlement
Returns
Type Description
LocString

Delete()

Declaration
public void Delete()

Destroyed()

Declaration
public override void Destroyed()
Overrides
SimpleEntry.Destroyed()

Initialize()

Declaration
public override void Initialize()
Overrides
SimpleEntry.Initialize()

OnPostLoad()

Declaration
public void OnPostLoad()

Reset()

Resets texture bytes and approval state, useful for replacing portrait images without creating a new texture.

Declaration
public void Reset()

SetReviewState(TextureReviewState)

Declaration
public void SetReviewState(TextureReviewState state)
Parameters
Type Name Description
TextureReviewState state

SetTextureData(Byte[])

Declaration
public void SetTextureData(byte[] textureData)
Parameters
Type Name Description
System.Byte[] textureData

Tooltip()

Declaration
[NewTooltip]
public LocString Tooltip()
Returns
Type Description
LocString

UILinkContent()

Declaration
public override LocString UILinkContent()
Returns
Type Description
LocString
Overrides
SimpleEntry.UILinkContent()

Explicit Interface Implementations

IGeneratesCulture.CultureGenerated

Declaration
float IGeneratesCulture.CultureGenerated { get; }
Returns
Type Description
System.Single

IHasReputation.CanGiveReputation(User)

Declaration
Result IHasReputation.CanGiveReputation(User giver)
Parameters
Type Name Description
User giver
Returns
Type Description
Result

IHasReputation.UserSource

Declaration
User IHasReputation.UserSource { get; }
Returns
Type Description
User

Implements

ILinkableParameterized<T>
ILinkableParameterized<T>
ILinkable
IValidity
ICachesValidity
IHasID
INamed
IReInitializable
IHasReferenceableSerializableID
IHasSerializableID
System.ComponentModel.INotifyPropertyChanged
IDescribable
ISuffixName
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasReputation
IReputationAssociated
IController
IViewController
IHasUniversalID
IGeneratesCulture

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
CultureTooltipLibrary.ArtworkValue(UserTexture)
MiscTooltipLibrary.SimpleEntryTooltip(SimpleEntry, User)
MiscTooltipLibrary.SimpleEntryTitle(SimpleEntry)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾