public List <List <TextMenu.Item> > CreateDashCountMenu(TextMenu menu, bool inGame, int dashes, out TextMenuExt.EnumerableSlider <uint> typeSlider) { typeSlider = new TextMenuExt.EnumerableSlider <uint>("Type:", Hyperline.Instance.hairTypes.GetHairNames(), Settings.hairTypeList[dashes]); typeSlider.Change(v => { Settings.hairTypeList[dashes] = v; UpdateHairType(dashes, v); }); List <List <TextMenu.Item> > returnV = new List <List <TextMenu.Item> >(); foreach (KeyValuePair <uint, IHairType> hair in Hyperline.Settings.hairList[dashes]) { returnV.Add(hair.Value.CreateMenu(menu, inGame)); } return(returnV); }
public void CreatePresetMenu(TextMenu menu) { if (Hyperline.Instance.presetManager.presets.Count != 0) { List <KeyValuePair <uint, string> > enumerableList = new List <KeyValuePair <uint, string> >(); for (uint i = 0; i < Hyperline.Instance.presetManager.presets.Count; i++) { enumerableList.Add(new KeyValuePair <uint, string>(i, Hyperline.Instance.presetManager.presets[(int)i].Key)); } TextMenuExt.EnumerableSlider <uint> slider = new TextMenuExt.EnumerableSlider <uint>("Preset:", enumerableList, 0); slider.Change(v => { currentPreset = (int)v; }); menu.Add(slider); TextMenu.Button applyButton = new TextMenu.Button("Apply Preset"); applyButton.Pressed(CopyPreset); menu.Add(applyButton); } }