Skip to content

Commit

Permalink
don't try to save a preset if player input is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
carmineos committed Jun 2, 2020
1 parent 53f1b54 commit 69638fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions VStancer.Client/UI/ClientPresetsMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ internal ClientPresetsMenu(ClientPresetsScript script, string name = Globals.Scr
ButtonPressHandlers.Add(new ButtonPressHandler(Control.PhoneExtraOption, ControlPressCheckType.JUST_RELEASED, new Action<Menu, Control>(async (sender, control) =>
{
string presetName = await _script.GetPresetNameFromUser("VSTANCER_ENTER_PRESET_NAME", "");

if (string.IsNullOrEmpty(presetName))
return;

SavePresetEvent?.Invoke(this, presetName.Trim());
}), true));

Expand Down

0 comments on commit 69638fa

Please sign in to comment.