public LanguageSelector(ThemeConfig theme) : base("Default", theme.Colors.PrimaryTextColor) { this.MinimumSize = new Vector2(this.LocalBounds.Width, this.LocalBounds.Height); this.BorderColor = theme.GetBorderColor(75); CreateLanguageDict(); foreach (KeyValuePair <string, string> entry in languageDict) { AddItem(entry.Key, entry.Value); } string languageCode = UserSettings.Instance.get(UserSettingsKey.Language); foreach (KeyValuePair <string, string> entry in languageDict) { if (languageCode == entry.Value) { SelectedLabel = entry.Key; break; } } }
public BoundDropList(string noSelectionString, ThemeConfig theme, int maxHeight = 0) : base(noSelectionString, theme.Colors.PrimaryTextColor, maxHeight: maxHeight, pointSize: theme.DefaultFontSize) { this.BorderColor = theme.GetBorderColor(75); }