editor

package
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package editor implements the minimal Linefire vector editor: an ebiten game with a large drawing canvas on the left and a real-size preview plus a properties panel on the right.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(a *asset.Asset, savePath string) error

Run configures the window and starts the ebiten game loop.

Types

type Editor

type Editor struct {
	// contains filtered or unexported fields
}

Editor is the ebiten.Game implementation that owns the document and all transient editing state.

func New

func New(a *asset.Asset, savePath string) *Editor

New creates an editor for the given asset. savePath is the file used when saving; pass an empty string to use the default file name.

func (*Editor) Draw

func (e *Editor) Draw(screen *ebiten.Image)

Draw renders the whole editor for one frame. The CRT post-process is applied only to the small preview (which represents the in-game look), not the whole editing UI.

func (*Editor) Layout

func (e *Editor) Layout(outsideWidth, outsideHeight int) (int, int)

Layout uses a fixed logical resolution; the window may be resized but the content keeps these dimensions.

func (*Editor) SetOnBack

func (e *Editor) SetOnBack(fn func())

SetOnBack wires the host callback that returns to the map editor. Called by the editapp host; nil means standalone (no Back button).

func (*Editor) Update

func (e *Editor) Update() error

Update advances one frame of input handling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL