private void _spriteDropdown_ItemSelected(Base sender, ItemSelectedEventArgs arguments) { SpritePanel.Texture = Globals.ContentManager.GetTexture( GameContentManager.TextureType.Entity, mSpriteDropdown.Text ); if (SpritePanel.Texture != null) { SpritePanel.SetTextureRect(0, 0, SpritePanel.Texture.GetWidth() / Options.Instance.Sprites.NormalFrames, SpritePanel.Texture.GetHeight() / Options.Instance.Sprites.Directions); SpritePanel.SetSize(SpritePanel.Texture.GetWidth() / Options.Instance.Sprites.NormalFrames, SpritePanel.Texture.GetHeight() / Options.Instance.Sprites.Directions); Align.AlignTop(SpritePanel); Align.CenterHorizontally(SpritePanel); } }
private void _spriteDropdown_ItemSelected(Base sender, ItemSelectedEventArgs arguments) { SpritePanel.Texture = Globals.ContentManager.GetTexture( GameContentManager.TextureType.Entity, mSpriteDropdown.Text ); if (SpritePanel.Texture != null) { SpritePanel.SetUv(0, 0, .25f, .25f); SpritePanel.SetSize(SpritePanel.Texture.GetWidth() / 4, SpritePanel.Texture.GetHeight() / 4); Align.AlignTop(SpritePanel); Align.CenterHorizontally(SpritePanel); } }