Beispiel #1
0
 void OnMouseDown()
 {
     if(KeyConfigRow.sm_rowActive != this) {
         if(KeyConfigRow.sm_rowActive != null) {
             KeyConfigRow.sm_rowActive.ResetState();
         }
     }
     sm_rowActive = this;
     Highlight();
 }
Beispiel #2
0
 void OnGUI()
 {
     if(KeyConfigRow.sm_rowActive != this) {
         return;
     }
     if(Event.current.type != EventType.KeyDown || !Event.current.isKey) {
         return;
     }
     var key = Event.current.keyCode.ToString();
     m_value.text = key;
     CustomInput.SaveSetting(CustomInput.ResolveLogicalName(m_logicalName), key);
     CustomInput.Save ();
     KeyConfigRow.sm_rowActive = null;
     Unhighlight();
 }