mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
GUI rearrangement
This commit is contained in:
parent
04f8c6a2e4
commit
2e50221118
90 changed files with 435 additions and 1440 deletions
34
Assets/Scripts/Keybinds/Keybind.cs
Normal file
34
Assets/Scripts/Keybinds/Keybind.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class Keybind
|
||||
{
|
||||
public string command;
|
||||
public bool requiresAnimationDef = true;
|
||||
public bool repeatable = false;
|
||||
public KeybindData win;
|
||||
public KeybindData mac;
|
||||
|
||||
[XmlIgnore] public List<KeyCode> keyModifiers { get { return GetKeybindData().keyModifiers; } }
|
||||
[XmlIgnore] public KeyCode keyCode { get { return GetKeybindData().keyCode; } }
|
||||
|
||||
private KeybindData GetKeybindData()
|
||||
{
|
||||
bool runningOSX = Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor;
|
||||
return runningOSX ? mac : win;
|
||||
}
|
||||
}
|
||||
|
||||
public class KeybindData
|
||||
{
|
||||
[XmlArray("keyModifiers"), XmlArrayItem("li")] public List<KeyCode> keyModifiers = new List<KeyCode>();
|
||||
public KeyCode keyCode = KeyCode.None;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue