mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
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 AnimationDefCard : MonoBehaviour
|
|
{
|
|
public InputField defNameField;
|
|
public InputField labelField;
|
|
//public Toggle playSoundsToggle;
|
|
|
|
public void Update()
|
|
{
|
|
if (Workspace.animationDef == null) return;
|
|
|
|
if (defNameField.isFocused == false)
|
|
{ defNameField.text = Workspace.animationDef.defName; }
|
|
|
|
if (labelField.isFocused == false)
|
|
{ labelField.text = Workspace.animationDef.label; }
|
|
|
|
//playSoundsToggle.isOn = Workspace.animationDef.sounds;
|
|
}
|
|
|
|
public void UpdateAnimationDef()
|
|
{
|
|
Workspace.animationDef.defName = defNameField.text;
|
|
Workspace.animationDef.label = labelField.text;
|
|
//Workspace.animationDef.sounds = playSoundsToggle.isOn;
|
|
|
|
Workspace.Instance.MakeHistoricRecord("AnimationDef update");
|
|
}
|
|
}
|
|
}
|