コード例 #1
0
        void OnGUI()
        {
            if (langPack == null)
            {
                langPack = LangSys.DATA;
            }

            if (styleBox == null)
            {
                InitStyles();
            }

            //Languages
            scrollPos = GUI.BeginScrollView(new Rect(0f, 0f, position.width, position.height), scrollPos, new Rect(8f, 8f, position.width - 32f, (langPack.keys.Count + 1) * 100f - 20f), false, true);
            Languages(new Rect(16f, 16f, position.width - 32f, position.height - 80f));
            GUI.EndScrollView();
        }
コード例 #2
0
        void Update()
        {
            if (langPack == null)
            {
                langPack = LangSys.DATA;
            }

            ProceedTask();

            if (!langPack.languages.ContainsKey(langPack.mainLang) && langPack.keys.Count > 0)
            {
                langPack.mainLang = langPack.keys[0];
                SaveChanges();
            }

            if (!langPack.languages.ContainsKey(LangSys.activeLang) && langPack.keys.Count > 0)
            {
                LangSys.activeLang = langPack.keys[0];
            }
        }
コード例 #3
0
 public static void Preload()
 {
     dataCache = DATA;
 }
コード例 #4
0
 void OnEnable()
 {
     minSize      = new Vector2(400f, 200f);
     titleContent = new GUIContent("Language Settings");
     langPack     = LangSys.DATA;
 }