mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Sprites;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityEditor.U2D
|
||||
{
|
||||
public class SpriteShapeEditorGUI
|
||||
{
|
||||
private const float kSpacingSubLabel = 2.0f;
|
||||
private const float kMiniLabelW = 13;
|
||||
private const int kVerticalSpacingMultiField = 0;
|
||||
private const float kIndentPerLevel = 15;
|
||||
public static int s_FoldoutHash = "Foldout".GetHashCode();
|
||||
|
||||
public static void MultiDelayedIntField(Rect position, GUIContent[] subLabels, int[] values, float labelWidth)
|
||||
{
|
||||
int eCount = values.Length;
|
||||
float w = (position.width - (eCount - 1) * kSpacingSubLabel) / eCount;
|
||||
Rect nr = new Rect(position);
|
||||
nr.width = w;
|
||||
float t = EditorGUIUtility.labelWidth;
|
||||
int l = EditorGUI.indentLevel;
|
||||
EditorGUIUtility.labelWidth = labelWidth;
|
||||
EditorGUI.indentLevel = 0;
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
values[i] = EditorGUI.DelayedIntField(nr, subLabels[i], values[i]);
|
||||
nr.x += w + kSpacingSubLabel;
|
||||
}
|
||||
EditorGUIUtility.labelWidth = t;
|
||||
EditorGUI.indentLevel = l;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue