Example #1
0
        public override void Render()
        {
            if (Everest.Flags.IsDisabled)
            {
                orig_Render();
                return;
            }

            orig_Render();
            if (maplistEase > 0f)
            {
                Vector2 pos = new Vector2(128f * Ease.CubeOut(maplistEase), 1080f - 128f);
                if (journalEnabled)
                {
                    pos.Y -= 128f;
                }
                GFX.Gui["menu/maplist"].DrawCentered(pos, Color.White * Ease.CubeOut(maplistEase));
                (Input.GuiInputController() ? Input.GuiButton(Input.Pause) : Input.GuiButton(Input.ESC)).Draw(pos, Vector2.Zero, Color.White * Ease.CubeOut(maplistEase));
            }

            if (levelsetEase > 0f)
            {
                Vector2 pos  = new Vector2(1920f - 64f * Ease.CubeOut(maplistEase), 1080f - 128f);
                string  line = DialogExt.CleanLevelSet(currentLevelSet);
                ActiveFont.DrawOutline(line, pos, new Vector2(1f, 0.5f), Vector2.One * 0.7f, Color.White * Ease.CubeOut(maplistEase), 2f, Color.Black * Ease.CubeOut(maplistEase));
                Vector2 lineSize = ActiveFont.Measure(line) * 0.7f;
                Input.GuiDirection(new Vector2(0f, -1f)).DrawCentered(pos + new Vector2(-lineSize.X * 0.5f, -lineSize.Y * 0.5f - 16f), Color.White * Ease.CubeOut(maplistEase), 0.5f);
                Input.GuiDirection(new Vector2(0f, +1f)).DrawCentered(pos + new Vector2(-lineSize.X * 0.5f, +lineSize.Y * 0.5f + 16f), Color.White * Ease.CubeOut(maplistEase), 0.5f);
            }
        }
Example #2
0
        public new void CreateButtons()
        {
            orig_CreateButtons();

            if (Everest.Flags.IsDisabled || !CoreModule.Settings.ShowModOptionsInGame)
            {
                return;
            }

            if (!Exists)
            {
                if (AreaData.Areas.Select(area => area.GetLevelSet()).Distinct().Count() > 1)
                {
                    buttons.Add(NewGameLevelSetButton = new patch_Button()
                    {
                        Label  = DialogExt.CleanLevelSet(NewGameLevelSet ?? "Celeste"),
                        Scale  = 0.5f,
                        Action = () => {
                            if (NewGameLevelSet == null)
                            {
                                NewGameLevelSet = "Celeste";
                            }

                            int id = AreaData.Areas.FindLastIndex(area => area.GetLevelSet() == NewGameLevelSet) + 1;
                            if (id >= AreaData.Areas.Count)
                            {
                                id = 0;
                            }
                            NewGameLevelSet = AreaData.Areas[id].GetLevelSet();

                            NewGameLevelSetButton.Label = DialogExt.CleanLevelSet(NewGameLevelSet ?? "Celeste");
                        }
                    });
                }
            }
        }