public void Add(string name, bool defaultValue = true)
{
var textureName = name;
if (this.Dictionary.ContainsKey(name))
{
name += this.random.Next(1, 9);
}
if (this.SValuesDictionary.ContainsKey(name))
{
defaultValue = this.SValuesDictionary[name];
}
this.Dictionary.Add(name, defaultValue);
if (!Menu.TextureDictionary.ContainsKey(name))
{
Menu.TextureDictionary.Add(
name,
textureName.Substring(0, "item".Length) == "item"
? Textures.GetTexture("materials/ensage_ui/items/" + textureName.Substring("item_".Length) + ".vmat")
: Textures.GetTexture("materials/ensage_ui/spellicons/" + textureName + ".vmat"));
}
if (!this.SValuesDictionary.ContainsKey(name))
{
this.SValuesDictionary.Add(name, defaultValue);
}
if (this.PositionDictionary.ContainsKey(name))
{
return;
}
this.PositionDictionary.Add(name, new float[] { 0, 0 });
}