예제 #1
0
        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;
                }
            }
        }
예제 #2
0
 public BoundDropList(string noSelectionString, ThemeConfig theme, int maxHeight = 0)
     : base(noSelectionString, theme.Colors.PrimaryTextColor, maxHeight: maxHeight, pointSize: theme.DefaultFontSize)
 {
     this.BorderColor = theme.GetBorderColor(75);
 }