Ejemplo n.º 1
0
 public void SetActiveState(bool isActive)
 {
     if (isActive)
     {
         m_stateLabel.SetContent(m_on);
         m_stateLabel.SetColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
     }
     else
     {
         m_stateLabel.SetContent(m_off);
         m_stateLabel.SetColor(SA_PluginSettingsWindowStyles.ProDisabledImageColor);
     }
 }
Ejemplo n.º 2
0
        protected override void OnAfterHeaderGUI()
        {
            var capability = m_getCapability();

            if (capability.Enabled)
            {
                m_stateLabel.SetContent(m_on);
                m_stateLabel.SetColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
            }
            else
            {
                m_stateLabel.SetContent(m_off);
                m_stateLabel.SetColor(m_normalColor);
            }

            GUILayout.FlexibleSpace();
            bool click = m_stateLabel.Draw(GUILayout.Width(40));

            if (click)
            {
                capability.Enabled = !capability.Enabled;
            }
        }