public SelectableText(UITextPhrase self, InfoPanel infoPanel, SelectableList selList, string header, List <string> properties, bool isOption = true) { this.opdict = infoPanel.opdict; this.uilist = infoPanel.uielem; this.selList = selList; this.infoPanel = infoPanel; target = header; values = properties != null?properties.ToList() : new List <string>(); if (values.Count > 1 || (values.Count == 1 && values[0].Equals(OptionsDict.SelectableList.removeTag))) { values.Insert(0, "# " + header); } this.self = self; this.targetUIdesc = infoPanel.uidesc; if (properties != null && properties.Count > 0) { if (isOption) { self.OnClick += SelectOption; } else { self.OnClick += select; } self.OnMouseOver += ChangeToGrey; self.OnMouseOut += ChangeToWhite; } }
public InfoPanel(UIList uielem, UIListDescription uidesc, OptionsDict opdict) { this.uielem = uielem; this.uidesc = uidesc; this.opdict = opdict; selectables = new List <Selectable>(); }
private void RemoveOption(UIMouseEvent evt, UIElement listeningElement) { targetUIdesc.ClearCurrent(); values.Clear(); opdict = null; this.uilist.Remove(self); infoPanel.selectables.Remove(thisAsSel); }
public SelectableText(UITextPhrase self, UIListDescription targetUIdesc, OptionsDict opdict, string header, string[] properties) { values = new List <string>(); for (int i = 0; i < properties.Length; i++) { values.Add(properties[i]); } Create(self, targetUIdesc, opdict, header, values); }
public SelectableText(UITextPhrase self, UIListDescription targetUIdesc, OptionsDict opdict, string header, string properties = "") { values = new List <string>(); if (!properties.Equals("")) { values.Add(properties); } Create(self, targetUIdesc, opdict, header, values); }
private void Create(UITextPhrase self, UIListDescription targetUIdesc, OptionsDict opdict, string header, List <string> properties) { this.opdict = opdict; target = header; values = properties != null?properties.ToList() : new List <string>(); if (values.Count > 1) { values.Insert(0, "# " + header); } this.self = self; this.targetUIdesc = targetUIdesc; if (properties != null && properties.Count > 0) { self.OnClick += select; self.OnMouseOver += ChangeToGrey; self.OnMouseOut += ChangeToWhite; } }
public SelectableText(UITextPhrase self, UIListDescription targetUIdesc, OptionsDict opdict, string header, List <string> properties) { values = properties; Create(self, targetUIdesc, opdict, header, values); }