コード例 #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);
 }
コード例 #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");
            }
        }
コード例 #3
0
ファイル: RagdollParams.cs プロジェクト: Cavcode/Barotrauma
 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);
         }
     }
 }
コード例 #4
0
 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
         };
     }
 }
コード例 #5
0
 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
         };
     }
 }
コード例 #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
         };
     }
 }
コード例 #7
0
ファイル: RagdollParams.cs プロジェクト: Cavcode/Barotrauma
 public virtual void AddToEditor(ParamsEditor editor)
 {
     SerializableEntityEditor = new SerializableEntityEditor(editor.EditorBox.Content.RectTransform, this, inGame: false, showName: true);
     SubParams.ForEach(sp => sp.AddToEditor(editor));
 }