Remove to staxie
parent
b557272c04
commit
95f6509d35
14
app.go
14
app.go
|
@ -6,7 +6,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"spriteStackist/pkg/data"
|
||||
|
||||
"github.com/kettek/staxie/pkg/data"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/runtime"
|
||||
)
|
||||
|
@ -27,16 +28,11 @@ func (a *App) startup(ctx context.Context) {
|
|||
a.ctx = ctx
|
||||
}
|
||||
|
||||
// Greet returns a greeting for the given name
|
||||
func (a *App) Greet(name string) string {
|
||||
return fmt.Sprintf("Hello %s, It's show time!", name)
|
||||
func (a *App) Load(name string) *data.StaxieFileV1 {
|
||||
return &data.StaxieFileV1{}
|
||||
}
|
||||
|
||||
func (a *App) Load(name string) *data.StackistFileV1 {
|
||||
return &data.StackistFileV1{}
|
||||
}
|
||||
|
||||
func (a *App) Save(name string, file *data.StackistFileV1) error {
|
||||
func (a *App) Save(name string, file *data.StaxieFileV1) error {
|
||||
b, err := json.Marshal(file)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<title>spriteStackist</title>
|
||||
<title>Staxie</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
f001f3ad84549a4a16ef6303845139bd
|
||||
6370e69c73297099c048eead390477f3
|
|
@ -87,7 +87,7 @@
|
|||
let showExport: boolean = false
|
||||
let showNew: boolean = false
|
||||
let importValid: boolean = false
|
||||
let importFile: data.StackistFileV1 = null
|
||||
let importFile: data.StaxieFileV1 = null
|
||||
let importFilepath: string = ''
|
||||
let importCanvas: Canvas = null
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
let width: number = 16
|
||||
let height: number = 16
|
||||
let rowBasedFrames: boolean = true
|
||||
export let file: data.StackistFileV1
|
||||
export let file: data.StaxieFileV1
|
||||
export let filepath: string = ''
|
||||
export let canvas: Canvas
|
||||
let img: HTMLImageElement
|
||||
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
|
||||
function remakeFile() {
|
||||
file = data.StackistFileV1.createFrom({
|
||||
file = data.StaxieFileV1.createFrom({
|
||||
width: width,
|
||||
height: height,
|
||||
groups: {}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
let width: number = 64
|
||||
let height: number = 64
|
||||
let indexed: boolean = true
|
||||
export let file: data.StackistFileV1
|
||||
export let file: data.StaxieFileV1
|
||||
export let canvas: Canvas
|
||||
export let open: boolean = false
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
canvas = new Canvas(width, height)
|
||||
canvas.addNewPaletteColor(0, 0, 0, 0)
|
||||
canvas.isIndexed = indexed
|
||||
file = data.StackistFileV1.createFrom({
|
||||
file = data.StaxieFileV1.createFrom({
|
||||
width: width,
|
||||
height: height,
|
||||
groups: {}
|
||||
|
@ -40,7 +40,7 @@
|
|||
canvas = new Canvas(width, height)
|
||||
canvas.addNewPaletteColor(0, 0, 0, 0)
|
||||
canvas.isIndexed = indexed
|
||||
file = data.StackistFileV1.createFrom({
|
||||
file = data.StaxieFileV1.createFrom({
|
||||
width: width,
|
||||
height: height,
|
||||
groups: {}
|
||||
|
|
|
@ -8,7 +8,7 @@ export interface LoadedFileOptions {
|
|||
filepath: string
|
||||
title: string
|
||||
canvas: Canvas
|
||||
data: data.StackistFileV1
|
||||
data: data.StaxieFileV1
|
||||
}
|
||||
|
||||
export class LoadedFile extends UndoableStack<LoadedFile> {
|
||||
|
@ -17,7 +17,7 @@ export class LoadedFile extends UndoableStack<LoadedFile> {
|
|||
canvas: Canvas
|
||||
selection: SelectionArea
|
||||
preview: Preview
|
||||
data: data.StackistFileV1
|
||||
data: data.StaxieFileV1
|
||||
|
||||
constructor(options: LoadedFileOptions) {
|
||||
super()
|
||||
|
|
|
@ -4,15 +4,13 @@ import {data} from '../models';
|
|||
|
||||
export function GetFilePath():Promise<string>;
|
||||
|
||||
export function Greet(arg1:string):Promise<string>;
|
||||
|
||||
export function Load(arg1:string):Promise<data.StackistFileV1>;
|
||||
export function Load(arg1:string):Promise<data.StaxieFileV1>;
|
||||
|
||||
export function OpenFileBytes(arg1:string):Promise<Array<number>>;
|
||||
|
||||
export function ReadBytes(arg1:string):Promise<Array<number>>;
|
||||
|
||||
export function Save(arg1:string,arg2:data.StackistFileV1):Promise<void>;
|
||||
export function Save(arg1:string,arg2:data.StaxieFileV1):Promise<void>;
|
||||
|
||||
export function SaveFileBytes(arg1:string,arg2:Array<number>):Promise<void>;
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ export function GetFilePath() {
|
|||
return window['go']['main']['App']['GetFilePath']();
|
||||
}
|
||||
|
||||
export function Greet(arg1) {
|
||||
return window['go']['main']['App']['Greet'](arg1);
|
||||
}
|
||||
|
||||
export function Load(arg1) {
|
||||
return window['go']['main']['App']['Load'](arg1);
|
||||
}
|
||||
|
|
|
@ -110,14 +110,14 @@ export namespace data {
|
|||
}
|
||||
}
|
||||
|
||||
export class StackistFileV1 {
|
||||
export class StaxieFileV1 {
|
||||
version: string;
|
||||
groups: {[key: string]: Group};
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new StackistFileV1(source);
|
||||
return new StaxieFileV1(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
|
|
2
main.go
2
main.go
|
@ -17,7 +17,7 @@ func main() {
|
|||
|
||||
// Create application with options
|
||||
err := wails.Run(&options.App{
|
||||
Title: "spriteStackist",
|
||||
Title: "Staxie",
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
AssetServer: &assetserver.Options{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package data
|
||||
|
||||
type StackistFileV1 struct {
|
||||
type StaxieFileV1 struct {
|
||||
Version string `json:"version"` // The version of the file format.
|
||||
Groups map[string]Group `json:"groups"`
|
||||
Width int `json:"width"`
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://wails.io/schemas/config.v2.json",
|
||||
"name": "spriteStackist",
|
||||
"outputfilename": "spriteStackist",
|
||||
"name": "Staxie",
|
||||
"outputfilename": "Staxie",
|
||||
"frontend:install": "npm install",
|
||||
"frontend:build": "npm run build",
|
||||
"frontend:dev:watcher": "npm run dev",
|
||||
|
|
Loading…
Reference in New Issue