Ejemplo n.º 1
0
 public virtual void AddToEditor(ParamsEditor editor)
 {
     if (!IsLoaded)
     {
         DebugConsole.ThrowError("[Params] Not loaded!");
         return;
     }
     SerializableEntityEditor = new SerializableEntityEditor(editor.EditorBox.Content.RectTransform, this, false, true);
 }
Ejemplo n.º 2
0
        public override void AddToEditor(ParamsEditor editor)
        {
            base.AddToEditor(editor);
            var subParams = GetAllSubParams();

            foreach (var subParam in subParams)
            {
                subParam.AddToEditor(editor);
                //TODO: divider sprite
                new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, 10), editor.EditorBox.Content.RectTransform),
                             style: "ConnectionPanelWire");
            }
        }
Ejemplo n.º 3
0
 public void AddToEditor(ParamsEditor editor, bool alsoChildren = true)
 {
     base.AddToEditor(editor);
     if (alsoChildren)
     {
         var subParams = GetAllSubParams();
         foreach (var subParam in subParams)
         {
             subParam.AddToEditor(editor);
             new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, 10), editor.EditorBox.Content.RectTransform),
                          style: null, color: Color.Black);
         }
     }
 }
 public virtual void AddToEditor(ParamsEditor editor, bool recursive = true, int space = 0, ScalableFont titleFont = null)
 {
     SerializableEntityEditor = new SerializableEntityEditor(editor.EditorBox.Content.RectTransform, this, inGame: false, showName: true, titleFont: titleFont ?? GUI.LargeFont);
     if (recursive)
     {
         SubParams.ForEach(sp => sp.AddToEditor(editor, true, titleFont: titleFont ?? GUI.SmallFont));
     }
     if (space > 0)
     {
         new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, space), editor.EditorBox.Content.RectTransform), style: null, color: new Color(20, 20, 20, 255))
         {
             CanBeFocused = false
         };
     }
 }
 public void AddToEditor(ParamsEditor editor, bool alsoChildren = true, bool recursive = true, int space = 0)
 {
     base.AddToEditor(editor);
     if (alsoChildren)
     {
         SubParams.ForEach(s => s.AddToEditor(editor, recursive));
     }
     if (space > 0)
     {
         new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, (int)(space * GUI.yScale)), editor.EditorBox.Content.RectTransform), style: null, color: ParamsEditor.Color)
         {
             CanBeFocused = false
         };
     }
 }
Ejemplo n.º 6
0
 public virtual void AddToEditor(ParamsEditor editor, int space = 0)
 {
     if (!IsLoaded)
     {
         DebugConsole.ThrowError("[Params] Not loaded!");
         return;
     }
     SerializableEntityEditor = new SerializableEntityEditor(editor.EditorBox.Content.RectTransform, this, false, true, titleFont: GUI.LargeFont);
     if (space > 0)
     {
         new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, space), editor.EditorBox.Content.RectTransform), style: null, color: ParamsEditor.Color)
         {
             CanBeFocused = false
         };
     }
 }
Ejemplo n.º 7
0
 public virtual void AddToEditor(ParamsEditor editor)
 {
     SerializableEntityEditor = new SerializableEntityEditor(editor.EditorBox.Content.RectTransform, this, inGame: false, showName: true);
     SubParams.ForEach(sp => sp.AddToEditor(editor));
 }