mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
GUI update
This commit is contained in:
parent
2e50221118
commit
d9e6288e3a
172 changed files with 563 additions and 116 deletions
Binary file not shown.
|
@ -105,6 +105,7 @@
|
|||
<Compile Include="Assets\Scripts\GUI\DropdownMenu.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\KeybindLabel.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\KeyframeSlider.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\LinearScale.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\QuiverToggle.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\RequiresAnimationDef.cs" />
|
||||
<Compile Include="Assets\Scripts\GUI\SelectActorLayerButton.cs" />
|
||||
|
|
200
Assets/Resources/Prefabs/LinearScaleTick.prefab
Normal file
200
Assets/Resources/Prefabs/LinearScaleTick.prefab
Normal file
|
@ -0,0 +1,200 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4519153595037294460
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5865042972203952037}
|
||||
- component: {fileID: 4773754530765333552}
|
||||
- component: {fileID: 8949439805660757818}
|
||||
m_Layer: 0
|
||||
m_Name: Tick
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5865042972203952037
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4519153595037294460}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6475516625516223088}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 5}
|
||||
m_SizeDelta: {x: 2, y: 32}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &4773754530765333552
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4519153595037294460}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8949439805660757818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4519153595037294460}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.9056604, g: 0.9056604, b: 0.9056604, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5439485647102441628
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7227308177506853860}
|
||||
- component: {fileID: 4618099823212146798}
|
||||
- component: {fileID: 5433021296761974750}
|
||||
m_Layer: 0
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7227308177506853860
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5439485647102441628}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6475516625516223088}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -1.5, y: 0}
|
||||
m_SizeDelta: {x: -3, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &4618099823212146798
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5439485647102441628}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5433021296761974750
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5439485647102441628}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 999
|
||||
--- !u!1 &5891687054347736455
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6475516625516223088}
|
||||
- component: {fileID: 2585039022071695514}
|
||||
m_Layer: 0
|
||||
m_Name: LinearScaleTick
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6475516625516223088
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5891687054347736455}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7227308177506853860}
|
||||
- {fileID: 5865042972203952037}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 50, y: 40}
|
||||
m_Pivot: {x: 1, y: 0}
|
||||
--- !u!222 &2585039022071695514
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5891687054347736455}
|
||||
m_CullTransparentMesh: 0
|
7
Assets/Resources/Prefabs/LinearScaleTick.prefab.meta
Normal file
7
Assets/Resources/Prefabs/LinearScaleTick.prefab.meta
Normal file
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 229f16c49d39ed446bf8c22c8065cd8a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -10658,7 +10658,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 63, y: -23.5}
|
||||
m_SizeDelta: {x: 4, y: -63}
|
||||
m_SizeDelta: {x: 6, y: -63}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &591894606
|
||||
MonoBehaviour:
|
||||
|
@ -12628,8 +12628,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 537.5, y: -52.5}
|
||||
m_SizeDelta: {x: 1055, y: 15}
|
||||
m_AnchoredPosition: {x: 537.5, y: -55}
|
||||
m_SizeDelta: {x: 1055, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &719308825
|
||||
GameObject:
|
||||
|
@ -17716,6 +17716,42 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1018392366}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1021107889
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1021107890}
|
||||
m_Layer: 0
|
||||
m_Name: LinearScalePanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1021107890
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1021107889}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1673215398}
|
||||
m_Father: {fileID: 1100016168}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 537.5, y: -75}
|
||||
m_SizeDelta: {x: 1055, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1029409988
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -18522,13 +18558,14 @@ RectTransform:
|
|||
- {fileID: 591894605}
|
||||
- {fileID: 539052777}
|
||||
- {fileID: 714321235}
|
||||
- {fileID: 1021107890}
|
||||
m_Father: {fileID: 531246357}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 40}
|
||||
m_SizeDelta: {x: 0, y: 65}
|
||||
m_SizeDelta: {x: 0, y: 90}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1100016169
|
||||
MonoBehaviour:
|
||||
|
@ -25739,6 +25776,84 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
valiationType: 1
|
||||
--- !u!1 &1469866143
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1469866144}
|
||||
- component: {fileID: 1469866145}
|
||||
- component: {fileID: 1469866146}
|
||||
m_Layer: 0
|
||||
m_Name: LinearScale
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1469866144
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1469866143}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1673215398}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1469866145
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1469866143}
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!114 &1469866146
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1469866143}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4264bb913f7501844bf60529d6b59b8a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
targetDivisions: 30
|
||||
divisionBands: 0100000002000000050000000a000000190000003200000064000000fa000000f4010000e8030000
|
||||
linearScaleTickPrefab: {fileID: 5891687054347736455, guid: 229f16c49d39ed446bf8c22c8065cd8a,
|
||||
type: 3}
|
||||
--- !u!1 &1469930348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -28812,6 +28927,42 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671366298}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1673215397
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1673215398}
|
||||
m_Layer: 0
|
||||
m_Name: LinearScaleParent
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1673215398
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673215397}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1469866144}
|
||||
m_Father: {fileID: 1021107890}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 22.5, y: 10}
|
||||
m_SizeDelta: {x: -61, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1676585153
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
72
Assets/Scripts/GUI/LinearScale.cs
Normal file
72
Assets/Scripts/GUI/LinearScale.cs
Normal file
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class LinearScale : Singleton<LinearScale>
|
||||
{
|
||||
public int targetDivisions = 30;
|
||||
public List<int> divisionBands = new List<int>() { 5, 10, 25, 50, 100, 250, 500, 1000 };
|
||||
public GameObject linearScaleTickPrefab;
|
||||
|
||||
private List<int> divisions = new List<int>();
|
||||
private float minDiff = -1f;
|
||||
private RectTransform rect;
|
||||
private int lastStageWindowSize = -1;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
rect = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (lastStageWindowSize != Workspace.StageWindowSize)
|
||||
{
|
||||
UpdateLinearScale();
|
||||
lastStageWindowSize = Workspace.StageWindowSize;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateLinearScale()
|
||||
{
|
||||
if (Workspace.animationDef == null) return;
|
||||
|
||||
minDiff = -1f;
|
||||
|
||||
foreach (int division in divisionBands)
|
||||
{
|
||||
float numDivisions = (float)Workspace.StageWindowSize / division;
|
||||
|
||||
if (minDiff >= 0f && Mathf.Abs(targetDivisions - numDivisions) > minDiff) continue;
|
||||
minDiff = Mathf.Abs(targetDivisions - numDivisions);
|
||||
|
||||
int i = 0;
|
||||
divisions.Clear();
|
||||
|
||||
while (i + division <= Workspace.StageWindowSize)
|
||||
{
|
||||
i += division;
|
||||
divisions.Add(i);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Transform child in transform)
|
||||
{ Destroy(child.gameObject); }
|
||||
|
||||
foreach (int division in divisions)
|
||||
{
|
||||
GameObject obj = Instantiate(linearScaleTickPrefab, transform);
|
||||
obj.GetComponentInChildren<Text>().text = division.ToString();
|
||||
|
||||
float xOffset = ((float)(division - 1) / (Workspace.StageWindowSize - 1)) * transform.parent.GetComponent<RectTransform>().rect.width;
|
||||
obj.GetComponent<RectTransform>().localPosition = new Vector3(xOffset, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/GUI/LinearScale.cs.meta
Normal file
11
Assets/Scripts/GUI/LinearScale.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4264bb913f7501844bf60529d6b59b8a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -15,7 +15,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public static int defaultAnimationClipLength = 600;
|
||||
public static int minTick = 1;
|
||||
public static int minAnimationClipLength = 2;
|
||||
public static int minAnimationClipLength = 5;
|
||||
public static int maxAnimationClipLength = 9999;
|
||||
|
||||
public static Color ColorWhite = new Color(1f, 1f, 1f);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Library/Artifacts/00/00239321763b9a991d3c57713b198d54
Normal file
BIN
Library/Artifacts/00/00239321763b9a991d3c57713b198d54
Normal file
Binary file not shown.
BIN
Library/Artifacts/03/03f0557b5cf74d6d70283babe400182c
Normal file
BIN
Library/Artifacts/03/03f0557b5cf74d6d70283babe400182c
Normal file
Binary file not shown.
BIN
Library/Artifacts/04/0480f60a89280d90d275c3727d72522e
Normal file
BIN
Library/Artifacts/04/0480f60a89280d90d275c3727d72522e
Normal file
Binary file not shown.
BIN
Library/Artifacts/04/04cc164750b2f52942356ad04f182dbc
Normal file
BIN
Library/Artifacts/04/04cc164750b2f52942356ad04f182dbc
Normal file
Binary file not shown.
BIN
Library/Artifacts/07/078ed3569ff951243cc994c75a1f5082
Normal file
BIN
Library/Artifacts/07/078ed3569ff951243cc994c75a1f5082
Normal file
Binary file not shown.
BIN
Library/Artifacts/0d/0d07cf9626cc061fd80471766545cb99
Normal file
BIN
Library/Artifacts/0d/0d07cf9626cc061fd80471766545cb99
Normal file
Binary file not shown.
BIN
Library/Artifacts/0e/0e732280316be472d676858df797fba5
Normal file
BIN
Library/Artifacts/0e/0e732280316be472d676858df797fba5
Normal file
Binary file not shown.
BIN
Library/Artifacts/0e/0ed2dfb92f6b6d54d80d337c2626ca4e
Normal file
BIN
Library/Artifacts/0e/0ed2dfb92f6b6d54d80d337c2626ca4e
Normal file
Binary file not shown.
BIN
Library/Artifacts/0f/0f794053420506c841ed4e4a5343bdf2
Normal file
BIN
Library/Artifacts/0f/0f794053420506c841ed4e4a5343bdf2
Normal file
Binary file not shown.
BIN
Library/Artifacts/0f/0fb9ce52920bc7e5eacf73db8dc787c3
Normal file
BIN
Library/Artifacts/0f/0fb9ce52920bc7e5eacf73db8dc787c3
Normal file
Binary file not shown.
BIN
Library/Artifacts/10/1002b96c631a577f27016503c8d2f605
Normal file
BIN
Library/Artifacts/10/1002b96c631a577f27016503c8d2f605
Normal file
Binary file not shown.
BIN
Library/Artifacts/10/109ff726c6e833be504b37af91766fb8
Normal file
BIN
Library/Artifacts/10/109ff726c6e833be504b37af91766fb8
Normal file
Binary file not shown.
BIN
Library/Artifacts/12/12f61b3c922c567d9d0408d33a23f4c2
Normal file
BIN
Library/Artifacts/12/12f61b3c922c567d9d0408d33a23f4c2
Normal file
Binary file not shown.
Binary file not shown.
BIN
Library/Artifacts/13/1381eb6793c7c110fd4e5d449aba8d8f
Normal file
BIN
Library/Artifacts/13/1381eb6793c7c110fd4e5d449aba8d8f
Normal file
Binary file not shown.
BIN
Library/Artifacts/14/142050b3a4bffe3270b9d6a3e66def38
Normal file
BIN
Library/Artifacts/14/142050b3a4bffe3270b9d6a3e66def38
Normal file
Binary file not shown.
BIN
Library/Artifacts/16/16f7f7e58c91828390e8b0aeb84aa2a1
Normal file
BIN
Library/Artifacts/16/16f7f7e58c91828390e8b0aeb84aa2a1
Normal file
Binary file not shown.
BIN
Library/Artifacts/19/195f445c5c5a43a02eaa9d86a2e23a85
Normal file
BIN
Library/Artifacts/19/195f445c5c5a43a02eaa9d86a2e23a85
Normal file
Binary file not shown.
BIN
Library/Artifacts/1a/1a506d0d739dfb529c8761bfa207b5b7
Normal file
BIN
Library/Artifacts/1a/1a506d0d739dfb529c8761bfa207b5b7
Normal file
Binary file not shown.
BIN
Library/Artifacts/1a/1ab98ca03905f28b6c39ca788b0fe482
Normal file
BIN
Library/Artifacts/1a/1ab98ca03905f28b6c39ca788b0fe482
Normal file
Binary file not shown.
BIN
Library/Artifacts/1c/1ca931e28bdaafd4c74d6f434aa0d45d
Normal file
BIN
Library/Artifacts/1c/1ca931e28bdaafd4c74d6f434aa0d45d
Normal file
Binary file not shown.
BIN
Library/Artifacts/1f/1fee76e5f1d3e48247be613a5cd0cfed
Normal file
BIN
Library/Artifacts/1f/1fee76e5f1d3e48247be613a5cd0cfed
Normal file
Binary file not shown.
BIN
Library/Artifacts/21/21267e672cd5d216e9c350e3280de331
Normal file
BIN
Library/Artifacts/21/21267e672cd5d216e9c350e3280de331
Normal file
Binary file not shown.
BIN
Library/Artifacts/21/21feb684c2f1f65f81faa6f32bd4a250
Normal file
BIN
Library/Artifacts/21/21feb684c2f1f65f81faa6f32bd4a250
Normal file
Binary file not shown.
BIN
Library/Artifacts/23/23e704b387e287b3150f6d3c2e71a3ba
Normal file
BIN
Library/Artifacts/23/23e704b387e287b3150f6d3c2e71a3ba
Normal file
Binary file not shown.
BIN
Library/Artifacts/29/2911669aa94c8e052a5901f12beecebc
Normal file
BIN
Library/Artifacts/29/2911669aa94c8e052a5901f12beecebc
Normal file
Binary file not shown.
BIN
Library/Artifacts/29/2973ac4620a605ebceac642dd30f06cb
Normal file
BIN
Library/Artifacts/29/2973ac4620a605ebceac642dd30f06cb
Normal file
Binary file not shown.
BIN
Library/Artifacts/2c/2c8d3d04a506ac73735f8a444bed80b8
Normal file
BIN
Library/Artifacts/2c/2c8d3d04a506ac73735f8a444bed80b8
Normal file
Binary file not shown.
BIN
Library/Artifacts/2d/2de6e2139215b3ec90be116764c90c3b
Normal file
BIN
Library/Artifacts/2d/2de6e2139215b3ec90be116764c90c3b
Normal file
Binary file not shown.
BIN
Library/Artifacts/2f/2f9c24143429c61c5d4460151a9b8883
Normal file
BIN
Library/Artifacts/2f/2f9c24143429c61c5d4460151a9b8883
Normal file
Binary file not shown.
BIN
Library/Artifacts/30/3069d698552889b77772cd9cb6f8edab
Normal file
BIN
Library/Artifacts/30/3069d698552889b77772cd9cb6f8edab
Normal file
Binary file not shown.
BIN
Library/Artifacts/31/3187c91257b65bed7f7b2e4625d97390
Normal file
BIN
Library/Artifacts/31/3187c91257b65bed7f7b2e4625d97390
Normal file
Binary file not shown.
BIN
Library/Artifacts/31/31b43b0cd8be4acfbb40199ec0dd003f
Normal file
BIN
Library/Artifacts/31/31b43b0cd8be4acfbb40199ec0dd003f
Normal file
Binary file not shown.
BIN
Library/Artifacts/33/33a2040ca334fd24a16e05c74eef56bc
Normal file
BIN
Library/Artifacts/33/33a2040ca334fd24a16e05c74eef56bc
Normal file
Binary file not shown.
BIN
Library/Artifacts/37/37716927cd797fe5152976feb8c92e18
Normal file
BIN
Library/Artifacts/37/37716927cd797fe5152976feb8c92e18
Normal file
Binary file not shown.
BIN
Library/Artifacts/38/38a0d161ed1165cb9a74539f2a66ef1c
Normal file
BIN
Library/Artifacts/38/38a0d161ed1165cb9a74539f2a66ef1c
Normal file
Binary file not shown.
BIN
Library/Artifacts/3b/3b4dc66da8fdc51b79f09df23693d5ab
Normal file
BIN
Library/Artifacts/3b/3b4dc66da8fdc51b79f09df23693d5ab
Normal file
Binary file not shown.
BIN
Library/Artifacts/3c/3c3ba915d74349e93b710f4e65c446d4
Normal file
BIN
Library/Artifacts/3c/3c3ba915d74349e93b710f4e65c446d4
Normal file
Binary file not shown.
BIN
Library/Artifacts/42/429b193f5b9deff361e08dd46425b82b
Normal file
BIN
Library/Artifacts/42/429b193f5b9deff361e08dd46425b82b
Normal file
Binary file not shown.
BIN
Library/Artifacts/46/46b3d61e1ab0ea05d53dd31b2d4c6c71
Normal file
BIN
Library/Artifacts/46/46b3d61e1ab0ea05d53dd31b2d4c6c71
Normal file
Binary file not shown.
BIN
Library/Artifacts/47/476a5c59ecec24774ae3c22c7a556f3c
Normal file
BIN
Library/Artifacts/47/476a5c59ecec24774ae3c22c7a556f3c
Normal file
Binary file not shown.
BIN
Library/Artifacts/47/47c442e840147ecf2cfd222d633133cc
Normal file
BIN
Library/Artifacts/47/47c442e840147ecf2cfd222d633133cc
Normal file
Binary file not shown.
BIN
Library/Artifacts/51/51d0db373c765a071362c34177fae410
Normal file
BIN
Library/Artifacts/51/51d0db373c765a071362c34177fae410
Normal file
Binary file not shown.
BIN
Library/Artifacts/52/52f519e05e0c7bb90e026980d1bcdf4b
Normal file
BIN
Library/Artifacts/52/52f519e05e0c7bb90e026980d1bcdf4b
Normal file
Binary file not shown.
BIN
Library/Artifacts/55/55685dc67b9f651c9baeea0018aedc71
Normal file
BIN
Library/Artifacts/55/55685dc67b9f651c9baeea0018aedc71
Normal file
Binary file not shown.
BIN
Library/Artifacts/5d/5db103aaf3bdcd6c950e5c5011fa3e3b
Normal file
BIN
Library/Artifacts/5d/5db103aaf3bdcd6c950e5c5011fa3e3b
Normal file
Binary file not shown.
BIN
Library/Artifacts/63/63473741527d04aa231f0be59ba6b83e
Normal file
BIN
Library/Artifacts/63/63473741527d04aa231f0be59ba6b83e
Normal file
Binary file not shown.
BIN
Library/Artifacts/66/66a823f622fbf344f53acd2d25fd9f0e
Normal file
BIN
Library/Artifacts/66/66a823f622fbf344f53acd2d25fd9f0e
Normal file
Binary file not shown.
BIN
Library/Artifacts/68/68d05261f1f5516684848f9e310d12a9
Normal file
BIN
Library/Artifacts/68/68d05261f1f5516684848f9e310d12a9
Normal file
Binary file not shown.
BIN
Library/Artifacts/69/69cadfd1b32dbab5d4656edf8e96dcfb
Normal file
BIN
Library/Artifacts/69/69cadfd1b32dbab5d4656edf8e96dcfb
Normal file
Binary file not shown.
BIN
Library/Artifacts/6d/6db03a7386d9a7247dfa9c2819cbf8f6
Normal file
BIN
Library/Artifacts/6d/6db03a7386d9a7247dfa9c2819cbf8f6
Normal file
Binary file not shown.
BIN
Library/Artifacts/71/7167e57cefbbddc84c411e14d797c528
Normal file
BIN
Library/Artifacts/71/7167e57cefbbddc84c411e14d797c528
Normal file
Binary file not shown.
BIN
Library/Artifacts/72/728c3f2716acc6ffdfb2966f837f63e3
Normal file
BIN
Library/Artifacts/72/728c3f2716acc6ffdfb2966f837f63e3
Normal file
Binary file not shown.
BIN
Library/Artifacts/74/745a879c563f924dd08e4b28644b4390
Normal file
BIN
Library/Artifacts/74/745a879c563f924dd08e4b28644b4390
Normal file
Binary file not shown.
BIN
Library/Artifacts/76/767f9427e84c9395c678e1e518f71889
Normal file
BIN
Library/Artifacts/76/767f9427e84c9395c678e1e518f71889
Normal file
Binary file not shown.
BIN
Library/Artifacts/77/77e66fea131e79fb11062d6d9dd328fe
Normal file
BIN
Library/Artifacts/77/77e66fea131e79fb11062d6d9dd328fe
Normal file
Binary file not shown.
BIN
Library/Artifacts/7d/7d179e5d1d25dbf1749974c75393bfe7
Normal file
BIN
Library/Artifacts/7d/7d179e5d1d25dbf1749974c75393bfe7
Normal file
Binary file not shown.
BIN
Library/Artifacts/80/80442c0451e4fae13abc6cd33f80294f
Normal file
BIN
Library/Artifacts/80/80442c0451e4fae13abc6cd33f80294f
Normal file
Binary file not shown.
BIN
Library/Artifacts/83/83b76df70343e755ee2f339a4c2201cd
Normal file
BIN
Library/Artifacts/83/83b76df70343e755ee2f339a4c2201cd
Normal file
Binary file not shown.
BIN
Library/Artifacts/85/8549fa597dd23d82afe8e17d182327ee
Normal file
BIN
Library/Artifacts/85/8549fa597dd23d82afe8e17d182327ee
Normal file
Binary file not shown.
BIN
Library/Artifacts/8a/8aa2e180d2fdad9a46a9bf85afc5e226
Normal file
BIN
Library/Artifacts/8a/8aa2e180d2fdad9a46a9bf85afc5e226
Normal file
Binary file not shown.
BIN
Library/Artifacts/8c/8c4911c105978caca9045b49fe9a3b8f
Normal file
BIN
Library/Artifacts/8c/8c4911c105978caca9045b49fe9a3b8f
Normal file
Binary file not shown.
BIN
Library/Artifacts/8e/8e00f18c462610e887154578ec21364c
Normal file
BIN
Library/Artifacts/8e/8e00f18c462610e887154578ec21364c
Normal file
Binary file not shown.
BIN
Library/Artifacts/8e/8ee16eacbaaf65f14cd6cadf5486cb41
Normal file
BIN
Library/Artifacts/8e/8ee16eacbaaf65f14cd6cadf5486cb41
Normal file
Binary file not shown.
BIN
Library/Artifacts/90/9068b058230ee959bf344c2e0709ba55
Normal file
BIN
Library/Artifacts/90/9068b058230ee959bf344c2e0709ba55
Normal file
Binary file not shown.
BIN
Library/Artifacts/94/9456a8990eaaecd243c7091ba864ca22
Normal file
BIN
Library/Artifacts/94/9456a8990eaaecd243c7091ba864ca22
Normal file
Binary file not shown.
BIN
Library/Artifacts/95/95b584cd56216f52b3b26ee6f2cda2f7
Normal file
BIN
Library/Artifacts/95/95b584cd56216f52b3b26ee6f2cda2f7
Normal file
Binary file not shown.
BIN
Library/Artifacts/95/95d536185016cadc4edc693675b21642
Normal file
BIN
Library/Artifacts/95/95d536185016cadc4edc693675b21642
Normal file
Binary file not shown.
BIN
Library/Artifacts/96/960a7299aa6f2c18eba6693f3f8fe946
Normal file
BIN
Library/Artifacts/96/960a7299aa6f2c18eba6693f3f8fe946
Normal file
Binary file not shown.
BIN
Library/Artifacts/9e/9ee87d2e2590abd6766e59221d52d391
Normal file
BIN
Library/Artifacts/9e/9ee87d2e2590abd6766e59221d52d391
Normal file
Binary file not shown.
BIN
Library/Artifacts/9f/9f711481c9ecf85c8d84c8d8f4d07543
Normal file
BIN
Library/Artifacts/9f/9f711481c9ecf85c8d84c8d8f4d07543
Normal file
Binary file not shown.
BIN
Library/Artifacts/a1/a146b93793e41fc328fcc94440e9024c
Normal file
BIN
Library/Artifacts/a1/a146b93793e41fc328fcc94440e9024c
Normal file
Binary file not shown.
BIN
Library/Artifacts/a1/a15e825e383192cf31440b0f6148fbe9
Normal file
BIN
Library/Artifacts/a1/a15e825e383192cf31440b0f6148fbe9
Normal file
Binary file not shown.
BIN
Library/Artifacts/a2/a28b3e8b2f3277c8457ddff78a2f8df0
Normal file
BIN
Library/Artifacts/a2/a28b3e8b2f3277c8457ddff78a2f8df0
Normal file
Binary file not shown.
BIN
Library/Artifacts/a7/a774122a0c72577ea4fe82c36159c27f
Normal file
BIN
Library/Artifacts/a7/a774122a0c72577ea4fe82c36159c27f
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue