fixed min tickets being reset to 0 if an invalid input is given
This commit is contained in:
parent
ed322796a4
commit
dd6b7fc89c
1 changed files with 3 additions and 1 deletions
|
@ -385,8 +385,10 @@ namespace TouchyTickets {
|
|||
});
|
||||
optionList.AddChild(new Paragraph(Anchor.AutoLeft, 1, Localization.Get("MinTicketsForAutoBuy") + ":"));
|
||||
var num = optionList.AddChild(ElementHelper.NumberField(Anchor.AutoLeft, new Vector2(1, 20), Options.Instance.MinTicketsForAutoBuy, 1000, null, (t, value) => {
|
||||
if (int.TryParse(value, out Options.Instance.MinTicketsForAutoBuy))
|
||||
if (int.TryParse(value, out var ret)) {
|
||||
Options.Instance.MinTicketsForAutoBuy = ret;
|
||||
Options.Save();
|
||||
}
|
||||
}));
|
||||
num.PositionOffset = new Vector2(0, 1);
|
||||
optionList.AddChild(new Paragraph(Anchor.AutoLeft, 1, p => Localization.Get("AutoBuyInterval") + ": " + Options.Instance.AutoBuyIntervalSecs));
|
||||
|
|
Loading…
Reference in a new issue