public void LoadContent(ContentManager c, List <string> buttonStringList) { textures = new TextureDict(c, "buttons"); foreach (var s in buttonStringList) { buttons.Add(MakeButton(s, 300, 100)); } FinalizeButtons(); }
public void LoadContent(ContentManager c, TextureDict mouseTextures) { toolboxTD = new TextureDict(c, "toolbox"); tilesTextureDict = new TextureDict(c, "tiles"); decoTextures = new TextureDict(c, "decos"); this.mouseTextures = mouseTextures; background = toolboxTD.dict["toolboxbackground"]; rect = new Rectangle(1280 - background.Width, 0, background.Width, background.Height); PopulateToolbox(); }
public Stream GetTexture(string name) { if (TextureDict.TryGetValue(name, out var texture)) { return(texture); } else { return(null); } }
public void SetTexture(string name, Stream texture) { if (TextureDict.ContainsKey(name)) { TextureDict[name] = texture; } else { TextureDict.Add(name, texture); } UpdatingResource?.Invoke(this, new UpdateEvent(GenericMaterialVariable.ResourceType.Texture, name)); }
public override void LoadContent(ContentManager c) { tileTextures = new TextureDict(c, "tiles"); mouseTextures = new TextureDict(c, "icons"); decorationTextures = new TextureDict(c, "decos"); brushTexture = tileTextures.dict["blank"]; mouseTexture = mouseTextures.dict["cursor"]; highlightGridTexture = mouseTextures.dict["highlight"]; toolbox.LoadContent(c, mouseTextures); Map.LoadContent(c); base.LoadContent(c); }
public void LoadContent(ContentManager c, string fileName = null) { textureDict = new TextureDict(c, "tiles"); decoTextureDict = new TextureDict(c, "decos"); Decorations = new List <Decoration>(); if (fileName == null) { terrainTiles = CreateBlankMap(); } else { LoadFromFile("Map.txt"); } }