Ejemplo n.º 1
0
        public static void RefreshBigPhotoPostfix(PhotoGallery __instance, ref int ____activeThumbnailIndex, ref tk2dSpriteCollectionData ____activeSpriteCollection, int __state)
        {
            ____activeThumbnailIndex = __state;
            __instance.bigPhoto.RemoveAllChildren();
            if (__state % 4 == 3)
            {
                SpriteObject spr = GameUtil.ImageFileToSprite(GirlNames[__state / 4] + ".png", GirlNames[__state / 4]);

                if (spr != null)
                {
                    __instance.bigPhoto.AddChild(spr);

                    SpriteObject updatedSprite = __instance.bigPhoto.GetChildren(true)[__instance.bigPhoto.GetChildren().Length - 1] as SpriteObject;
                    updatedSprite.SetLocalPosition(0, 0);
                    updatedSprite.SetOwnChildIndex(3);
                }
            }
        }
Ejemplo n.º 2
0
        public static void UpdateButton(LoadScreen __instance, ref SpriteObject ____creditsButton)
        {
            if (!BaseHunieModPlugin.newVersionAvailable)
            {
                return;
            }
            SpriteObject spr = GameUtil.ImageFileToSprite("update.png", "updatesprite");

            if (spr != null)
            {
                ____creditsButton.SetLightness(0f);
                ____creditsButton.AddChild(spr);

                updateSprite = ____creditsButton.GetChildren(true)[____creditsButton.GetChildren().Length - 1] as SpriteObject;
                updateSprite.SetLocalPosition(-83, 24);
                updateSprite.SetOwnChildIndex(3);
                updateSprite.spriteAlpha = 0f;
            }
        }