Esempio n. 1
0
        private void RenameButton_OnInputEntered(TextInputArgs e)
        {
            try
            {
                DataFolder.RenameFile(_selectedLevel.FilePath, _selectedLevel.Name, e.Input);
            }
            catch (Exception ex)
            {
                TMBAW_Game.MessageBox.Show(ex.Message);
            }

            TMBAW_Game.TextInputBox.OnInputEntered -= RenameButton_OnInputEntered;
            LoadLevels();
        }
Esempio n. 2
0
        private void NewLevel_OnTextEntered(TextInputArgs e)
        {
            string newPath;

            TMBAW_Game.TextInputBox.OnInputEntered -= NewLevel_OnTextEntered;

            try
            {
                newPath = DataFolder.CreateNewLevel(e.Input, 256, 256);
            }
            catch (Exception ex)
            {
                TMBAW_Game.MessageBox.Show(ex.Message);
                return;
            }

            LoadLevels();
            DataFolder.EditLevel(newPath);
        }