Beispiel #1
0
 public TextMatrix(Matrix4x4 existing)
 {
     for (var i = 0; i < _texts.Length; i++)
     {
         _texts[i] = new TextFloat(0);
     }
     Value = existing;
 }
Beispiel #2
0
			public GUIFloat(System.Object data, FieldInfo fi) : base(data, fi) {
				TextFloat = new TextFloat((float)fi.GetValue(data));
				_onGUI = () => {
					GUILayout.BeginHorizontal();
					GUILayout.Label(string.Format("{0} ", fi.Name), GUILayout.ExpandWidth(false));
					TextFloat.StrValue = GUILayout.TextField(TextFloat.StrValue, GUILayout.ExpandWidth(true), GUILayout.MinWidth(30f));
					GUILayout.EndHorizontal();
					Save();
				};		
			}
Beispiel #3
0
        public System.Action GenerateGUIFloat(FieldInfo fi)
        {
            var textFloat = new TextFloat((float)fi.GetValue(data));

            return(() => {
                GUILayout.BeginHorizontal();
                GUILayout.Label(string.Format("{0} ", fi.Name), GUILayout.ExpandWidth(false));
                textFloat.StrValue = GUILayout.TextField(textFloat.StrValue, GUILayout.ExpandWidth(true), GUILayout.MinWidth(30f));
                GUILayout.EndHorizontal();
                fi.SetValue(data, textFloat.Value);
            });
        }
Beispiel #4
0
 public TextMatrix(Matrix4x4 existing)
 {
     for (var i = 0; i < _texts.Length; i++)
         _texts[i] = new TextFloat(0);
     Value = existing;
 }
Beispiel #5
0
 public GUIFloat(System.Object data, FieldInfo fi)
     : base(data, fi)
 {
     TextFloat = new TextFloat((float)fi.GetValue(data));
     _onGUI = () => {
         GUILayout.BeginHorizontal();
         GUILayout.Label(string.Format("{0} ", fi.Name), GUILayout.ExpandWidth(false));
         TextFloat.StrValue = GUILayout.TextField(TextFloat.StrValue, GUILayout.ExpandWidth(true), GUILayout.MinWidth(30f));
         GUILayout.EndHorizontal();
         Save();
     };
 }