Example #1
0
        public override void OnInspectorGUI()
        {
            _settings = (Settings)target;

            if (_settings == null)
            {
                return;
            }

            var logoStyle = new GUIStyle();

            logoStyle.alignment = TextAnchor.MiddleCenter;
            var logoTexture = Resources.Load <Texture>("gow-logo");

            GUILayout.Label(logoTexture, logoStyle);

            var tabsList = new List <string>();

            System.Enum.GetValues(typeof(GOWSettingsTab)).Cast <GOWSettingsTab>().ForEach(t => {
                tabsList.Add(t.ToString());
            });

            _tab = (GOWSettingsTab)GUILayout.Toolbar((int)_tab, tabsList.ToArray());

            if (_tab == GOWSettingsTab.Login)
            {
                GowSettingsEditorLogin.OnGUI(_settings, this);
            }
            else if (_tab == GOWSettingsTab.Custom)
            {
                GowSettingsEditorSettings.OnGUI(_settings, this);
            }
        }
Example #2
0
 public void SetTab(GOWSettingsTab newTab)
 {
     _tab = newTab;
 }