예제 #1
0
 void UpdateCursors(params twin[] cursorPoses)
 {
     cursors.Clear();
     foreach (twin pos in cursorPoses)
     {
         cursors.Add(xxi.authorCursorBank.Spawn <AuthorCursor>().Setup(position: editGrid.CellPosToPoint(pos), fill: true));
     }
 }
예제 #2
0
        //// INTERNAL
        twin UpdateCursorPos()
        {
            twin mouseCellPos = paletteGrid.PointToCellPos(xxi.pcam.MouseWorldPoint());

            if (paletteGrid.CellPosInBounds(mouseCellPos) && ((AuthorCell)paletteGrid.GetCell(mouseCellPos)).type != (byte)AuthorCell_SuperType.Unused)
            {
                this.cursors.DoEach((cursor) => { cursor.spriter.enabled = true; cursor.position = paletteGrid.CellPosToPoint(mouseCellPos); });
            }
            else
            {
                this.cursors.DoEach((cursor) => { cursor.spriter.enabled = false; });
            }
            return(mouseCellPos);
        }