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,66 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.U2D.Animation
|
||||
{
|
||||
internal enum SpriteMeshViewMode
|
||||
{
|
||||
EditGeometry,
|
||||
CreateVertex,
|
||||
CreateEdge,
|
||||
SplitEdge
|
||||
}
|
||||
|
||||
internal enum MeshEditorAction
|
||||
{
|
||||
None,
|
||||
CreateVertex,
|
||||
MoveVertex,
|
||||
CreateEdge,
|
||||
SplitEdge,
|
||||
MoveEdge,
|
||||
SelectVertex,
|
||||
SelectEdge,
|
||||
Remove
|
||||
}
|
||||
|
||||
internal interface ISpriteMeshView
|
||||
{
|
||||
SpriteMeshViewMode mode { get; set; }
|
||||
ISelection<int> selection { get; set; }
|
||||
int defaultControlID { get; set; }
|
||||
Rect frame { get; set; }
|
||||
Vector2 mouseWorldPosition { get; }
|
||||
int hoveredVertex { get; }
|
||||
int hoveredEdge { get; }
|
||||
int closestEdge { get; }
|
||||
|
||||
void CancelMode();
|
||||
void BeginLayout();
|
||||
void EndLayout();
|
||||
void LayoutVertex(Vector2 position, int index);
|
||||
void LayoutEdge(Vector2 startPosition, Vector2 endPosition, int index);
|
||||
bool DoCreateVertex();
|
||||
bool DoSelectVertex(out bool additive);
|
||||
bool DoMoveVertex(out Vector2 delta);
|
||||
bool DoMoveEdge(out Vector2 delta);
|
||||
bool DoCreateEdge();
|
||||
bool DoSplitEdge();
|
||||
bool DoSelectEdge(out bool additive);
|
||||
bool DoRemove();
|
||||
void DrawVertex(Vector2 position);
|
||||
void DrawVertexHovered(Vector2 position);
|
||||
void DrawVertexSelected(Vector2 position);
|
||||
void BeginDrawEdges();
|
||||
void EndDrawEdges();
|
||||
void DrawEdge(Vector2 startPosition, Vector2 endPosition);
|
||||
void DrawEdgeHovered(Vector2 startPosition, Vector2 endPosition);
|
||||
void DrawEdgeSelected(Vector2 startPosition, Vector2 endPosition);
|
||||
bool IsActionTriggered(MeshEditorAction action);
|
||||
bool IsActionActive(MeshEditorAction action);
|
||||
bool IsActionHot(MeshEditorAction action);
|
||||
Vector2 WorldToScreen(Vector2 position);
|
||||
void DoRepaint();
|
||||
bool CanRepaint();
|
||||
bool CanLayout();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue