private void LoadSprites() { foreach (var champSkin in ChampSkinGUI.ChampSkins) { if (champSkin.SpriteInfoSmall == null || champSkin.SpriteInfoSmall.Sprite == null) { SpriteHelper.LoadTexture(champSkin.PicName, ref champSkin.SpriteInfoSmall, "SkinChanger\\Loading"); } if (champSkin.SpriteInfoSmall != null && champSkin.SpriteInfoSmall.DownloadFinished && !champSkin.SpriteInfoSmall.LoadingFinished) { champSkin.Pos = new Vector2(Drawing.Width / 2 - champSkin.SpriteInfoSmall.Sprite.Width / 2, Drawing.Height / 1.75f); champSkin.SpriteInfoSmall.Sprite.Scale = new Vector2(0.4f, 0.4f); champSkin.SpriteInfoSmall.Sprite.PositionUpdate = delegate { return(champSkin.Pos); }; champSkin.SpriteInfoSmall.Sprite.VisibleCondition = delegate { return(Misc.Miscs.GetActive() && SkinChangerMisc.GetActive() && SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameLoading").GetValue <bool>()); }; champSkin.SpriteInfoSmall.Sprite.Add(0); champSkin.SpriteInfoSmall.LoadingFinished = true; ChampSkinGUI.ChangeOrder(GetActiveIndex()); } if (champSkin.SpriteInfoBig == null || champSkin.SpriteInfoBig.Sprite == null) { SpriteHelper.LoadTexture(champSkin.PicName, ref champSkin.SpriteInfoBig, "SkinChanger\\Splash"); } if (champSkin.SpriteInfoBig != null && champSkin.SpriteInfoBig.DownloadFinished && !champSkin.SpriteInfoBig.LoadingFinished) { champSkin.SpriteInfoBig.Sprite.Scale = new Vector2(0.7f, 0.7f); champSkin.SpriteInfoBig.Sprite.PositionUpdate = delegate { return(new Vector2(champSkin.Pos.X + champSkin.SpriteInfoSmall.Sprite.Width / 2 - champSkin.SpriteInfoBig.Sprite.Width / 2, champSkin.Pos.Y - champSkin.SpriteInfoBig.Sprite.Height / 2)); }; champSkin.SpriteInfoBig.Sprite.VisibleCondition = delegate { return(Misc.Miscs.GetActive() && SkinChangerMisc.GetActive() && champSkin.Active && SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameLoading").GetValue <bool>() && SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameSplash").GetValue <bool>()); }; champSkin.SpriteInfoBig.Sprite.Add(-1); champSkin.SpriteInfoBig.LoadingFinished = true; } } }
void SkinChanger_ValueChanged(object sender, OnValueChangeEventArgs e) { ChampSkinGUI.ChangeOrder(e.GetNewValue <StringList>().SelectedIndex); }