Exemple #1
0
        public static void Show()
        {
            WindowBuilderSplit w = WindowBuilderSplit.Create("Load the game", "Load");

            //add files
            foreach (LoadSaveInfo info in LoadSaveMgmt.GetAllSaves())
            {
                w.Add(new LoadWindowSplitElement(info, w));
            }

            w.Finish();
        }
Exemple #2
0
        public static void Show()
        {
            WindowBuilderSplit w = WindowBuilderSplit.Create("Save the game", "Overwrite");

            UIHelper.CreateButton("Create new save", w.buttonPanel.transform, () =>
            {
                w.Add(new SaveWindowSplitElement(LoadSaveMgmt.CreateNewSave(), w));
            });

            //add files
            foreach (LoadSaveInfo info in LoadSaveMgmt.GetAllSaves())
            {
                w.Add(new SaveWindowSplitElement(info, w));
            }

            w.Finish();
        }
 public override void Perform()
 {
     LoadSaveMgmt.LoadSave(info.file);
 }
 public override void Perform()
 {
     info = LoadSaveMgmt.UpdateSave(info.file, GameMgmt.Get().data.name);
 }
 public override void ShowDetail(PanelBuilder panel)
 {
     info.ShowInfo(panel);
     panel.AddImageTextButton($"Delete {info.name}", "no", () => { LoadSaveMgmt.DeleteFile(info.file); w.CloseWindow(); });
 }