public override void ShowDetail(PanelBuilder panel) { panel.AddHeaderLabelT("name"); panel.AddInputRandom("Name", startConfig[id + "name"], s => { startConfig[id + "name"] = s; UIHelper.UpdateButtonText(button, s); }, () => LClass.s.NameGenerator("unit")); panel.AddHeaderLabelT("nation"); panel.AddDropdown(L.b.nations.Values().ToList(), startConfig[id + "nation"], s => { startConfig[id + "nation"] = s; }); panel.AddHeaderLabelT("coat"); panel.AddDropdown(L.b.coats.GetAllByCategory("kingdom"), startConfig[id + "coat"], s => { startConfig[id + "coat"] = s; UIHelper.UpdateButtonImage(button, L.b.coats[s].Sprite()); }); panel.AddHeaderLabelT("endlessWin"); panel.AddCheckbox(Boolean.Parse(startConfig[id + "winGold"]), S.T("endlessWinGold"), b => { startConfig[id + "winGold"] = b.ToString(); }); panel.AddHeaderLabelT("endlessLose"); panel.AddCheckbox(Boolean.Parse(startConfig[id + "loseKing"]), S.T("endlessLoseUnit"), b => { startConfig[id + "loseKing"] = b.ToString(); }); }
public override void ShowDetail(PanelBuilder panel) { panel.AddCheckbox(true, "Send errors automatically", s => { }).interactable = false; panel.AddCheckbox(true, "Send diagnostics", s => { }).interactable = false; panel.AddLabel( "If you do not want, to send the infos, please disable the network"); panel.AddLabel( "or use a firewall. See also the privacy statement in the help menu"); base.ShowDetail(panel); }
public void AddOption(PanelBuilder panel) { if (type == "bool") { panel.AddCheckbox(Bool(), Name(), s => { SetValue(Convert.ToString(s)); }); return; } if (type.StartsWith("scale")) { panel.AddHeaderLabel(Name()); var t = SplitHelper.SeparatorInt(SplitHelper.Delimiter(type).value); panel.AddSlider(t[0], t[1], PlayerPrefs.GetInt(id, Int32.Parse(Value())), s => { SetValue(s.ToString()); }); return; } if (type == "text") { panel.AddInput(Name(), Value(), SetValue); } if (type.StartsWith("dropdown")) { var values = SplitHelper.Separator(SplitHelper.Delimiter(type).value); List <string> titles = new List <string>(); foreach (var value in values) { titles.Add(S.T(value)); } panel.AddHeaderLabel(Name()); panel.AddDropdown(values, Value(), titles.ToArray(), SetValue); } }