@page "/admin/spritesheets/edit" @model SpriteSheets.EditModel @{ ViewData["Title"] = Model.Sheet.Id > 0 ? $"Edit: {Model.Sheet.Name}" : "New Sprite Sheet"; var isNew = Model.Sheet.Id == 0; }
← Back to Sprite Sheets

@ViewData["Title"]

@if (!isNew) {
@Html.AntiForgeryToken()
}
@if (!string.IsNullOrEmpty(Model.Message)) {
@Model.Message
} @if (TempData["Error"] != null) {
@TempData["Error"]
}
@Html.AntiForgeryToken()

Sprite Sheet Info

@* @if (!string.IsNullOrEmpty(Model.Sheet.CdnPath)) {

Preview (Sheet: @Model.Sheet.SheetWidth x @Model.Sheet.SheetHeight, Frame: @Model.Sheet.FrameWidth x @Model.Sheet.FrameHeight = @Model.Sheet.TotalFrames frames)

Sprite sheet preview
} *@ @if (!string.IsNullOrEmpty(Model.Sheet.CdnPath)) {

Preview (Sheet: @Model.Sheet.SheetWidth x @Model.Sheet.SheetHeight, Frame: @Model.Sheet.FrameWidth x @Model.Sheet.FrameHeight = @Model.Sheet.TotalFrames frames)

Click a cell to copy its frame index.

Selected Frame

Frame Index: -
Row/Col: -
Pixel: -

Quick Insert

This just copies; you can paste into any “Frames” sequence. (If you want auto-insert into the last-focused frame input, we can do that too.)

}
Cancel
@if (!isNew) {

Animations (@Model.Animations.Count)

@if (Model.Animations.Count > 0) {
@foreach (var anim in Model.Animations) {
@Html.AntiForgeryToken()
}
} else {

No animations defined. Add animations to use this sprite sheet.

} @*

Frame Reference (frames are numbered 0 to @(Model.Sheet.TotalFrames - 1), left-to-right, top-to-bottom)

@for (int i = 0; i < Model.Sheet.TotalFrames; i++) {
@i
}
*@
}
@section Scripts { }