mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Basic keybinds plus multi key selection
This commit is contained in:
parent
518a912ef1
commit
842c954455
89 changed files with 977 additions and 164 deletions
|
@ -95,7 +95,12 @@ namespace RimWorldAnimationStudio
|
|||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
Workspace.actorID = actorID;
|
||||
Workspace.keyframeID = keyframeID;
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand))
|
||||
{ Workspace.keyframeID.Add(keyframeID); }
|
||||
|
||||
else
|
||||
{ Workspace.keyframeID = new List<int> { keyframeID }; }
|
||||
|
||||
if (eventData.clickCount >= 2)
|
||||
{ AnimationController.Instance.stageTick = keyframe.atTick.Value; }
|
||||
|
@ -107,7 +112,8 @@ namespace RimWorldAnimationStudio
|
|||
{
|
||||
//AnimationController.Instance.stageTick = keyframe.atTick.Value;
|
||||
Workspace.actorID = actorID;
|
||||
Workspace.keyframeID = keyframeID;
|
||||
|
||||
Workspace.keyframeID = new List<int> { keyframeID };
|
||||
|
||||
dragTimeStart = Time.unscaledTime;
|
||||
}
|
||||
|
@ -132,17 +138,17 @@ namespace RimWorldAnimationStudio
|
|||
{ value = 1; return; }
|
||||
|
||||
interactable = false;
|
||||
Workspace.Instance.RecordEvent("Keyframe tick");
|
||||
Workspace.Instance.RecordEvent("Keyframe move");
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (keyframe.atTick.HasValue && Workspace.keyframeID == keyframeID && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
if (keyframe.atTick.HasValue && Workspace.keyframeID.Contains(keyframeID) && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
{ handleImage.color = Constants.ColorPurple; }
|
||||
|
||||
else if (Workspace.keyframeID == keyframeID)
|
||||
else if (Workspace.keyframeID.Contains(keyframeID))
|
||||
{ handleImage.color = Constants.ColorCyan; }
|
||||
|
||||
else if (keyframe.atTick.HasValue && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue