Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ else
end
```

## v1.3.15

* [`app.apiVersion`](api/app.md#appapiversion) is `35`
* Added [`sprite.undoHistory`](api/sprite.md#spriteundoHistoryundoSteps) [#5205](https://github.com/aseprite/aseprite/issues/5205)
* Added [`resizeable`](api/dialog.md#dialog) property to `Dialog` constructor [#5177](https://github.com/aseprite/aseprite/issues/5177)
* Added [`onchecked`](api/plugin.md#pluginnewcommand) parameter to Plugin:newCommand() [#5198](https://github.com/aseprite/aseprite/issues/5198)
* Added missing [`FlipType.DIAGONAL`](api/fliptype.md#fliptypediagonal) [#5359](https://github.com/aseprite/aseprite/issues/5359)
* Added [`app.tip`](api/app.md#apptip) [#5316](https://github.com/aseprite/aseprite/issues/5316) [#5348](https://github.com/aseprite/aseprite/issues/5348)
* Added `autofit` and `sizeHint` properties to Dialog [#5176](https://github.com/aseprite/aseprite/issues/5176)
* Refresh timeline when changing layer collapsed status [#5366](https://github.com/aseprite/aseprite/issues/5366)
* Process mnemonics consistently for plugins [#5250](https://github.com/aseprite/aseprite/issues/5250)
* Escape characters in the console that we can't show properly [#5324](https://github.com/aseprite/aseprite/issues/5324)

## v1.3.14.3

* [`app.apiVersion`](api/app.md#appapiversion) is `34`
* Added [`events`](api/sprite#spriteevents) to listen to `blendMode`, `name`, `opacity` and `visibility` Sprite layer changes [#5164](https://github.com/aseprite/aseprite/issues/5164)

## v1.3.14

* [`app.apiVersion`](api/app.md#appapiversion) is `33`
Expand Down Expand Up @@ -385,4 +403,4 @@ end
## v1.2.10-beta2

* [`app`](api/app.md#app)
* `app.apiVersion` didn't exist (is `nil`)
* `app.apiVersion` didn't exist (is `nil`)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Constants
* [BrushType](api/brushtype.md#brushtype)
* [ColorMode](api/colormode.md#colormode)
* [FilterChannels](api/filterchannels.md#filterchannel)
* [FlipType](api/fliptype.md#fliptype)
* [Ink](api/ink.md#ink)
* [MouseButton](api/mousebutton.md#mousebutton)
* [MouseCursor](api/mousecursor.md#mousecursor)
Expand Down
4 changes: 4 additions & 0 deletions api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ app.transaction(
end)
```

## app.clipboard

Check the [app.clipboard](app_clipboard.md#appclipboard) documentation.

## app.command

Check the [app.command](app_command.md#appcommand) documentation.
Expand Down
21 changes: 15 additions & 6 deletions api/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ local dlg = Dialog()
local dlg = Dialog(string)
local dlg = Dialog{ title=string,
notitlebar=false,
resizeable=false,
parent=otherDialog,
onclose=function }
```
Expand All @@ -76,13 +77,16 @@ bar of the dialog. The constructor that receives a table can receive a
special callback function (`onclose`) that is called when the dialog
is closed.

The `{ parent=otherDialog }` can be used to display an alert/subdialog
`{ parent=otherDialog }` can be used to display an alert/subdialog
inside a parent dialog (the parent dialog is blocked until the
child dialog is closed).

The `{ notitlebar=true }` can be used to display a dialog without any
`{ notitlebar=true }` can be used to display a dialog without any
kind of title bar (the dialog must be closed with a button inside it).

`{ resizeable=false }` disables the user from resizing the dialog.


Returns `nil` if there is no UI available, i.e. [app.isUIAvailable is `false`](app.md#appisuiavailable).

## Dialog:button()
Expand Down Expand Up @@ -501,10 +505,9 @@ experience with the user:
If a canvas widget handles these events, it will receive the
keyboard focus when it's clicked. The `ev` event is a
[KeyEvent](keyevent.md).
* `onmousemove`/`onmousedown`/`onmouseup`/`onwheel`: Mouse events when
the mouse is moved over the canvas, a button is pressed
(`onmousedown`), a button is released (`onmouseup`), or the mouse
wheel moved (`onwheel`). The `ev` event is a
* `onmousemove`/`onmousedown`/`onmouseup`/`onwheel`/`ondblclick`: Mouse events when
the mouse is moved over the canvas, a mouse button is pressed
(`onmousedown`), a mouse button double clicked (`ondblclick`) a button is released (`onmouseup`), or the mouse wheel moved (`onwheel`). The `ev` event is a
[MouseEvent](mouseevent.md).
* `ontouchmagnify`: Touch event generated when a pinch gesture is done
in the trackpad to zoom in or out. The `ev` event is a
Expand All @@ -516,6 +519,12 @@ setting. For instance, you can draw a 20[px]x30[px] rectangle in the canvas's Gr
will be displayed the same at any UI scale. This property is enabled by default if omitted, so if
you don't need it you must explicitly set it to false.

```lua
dlg:modify{ id=canvasId, mouseCursor=newMouseCursor }
```

Additionally, when using `Dialog:modify()`, the canvas `mouseCursor` property can be set to a [MouseCursor](mousecursor.md) value, changing the mouse cursor type.

## Dialog:repaint()

```lua
Expand Down
6 changes: 3 additions & 3 deletions api/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ The `color` can be a [`Color`](color.md#color) object or an [integer pixel value

## Palette.frame

At the moment it always return the first [frame](frame.md#frame), but in a
At the moment it will always return the first [frame](frame.md#frame), but in the
near future Aseprite will support palette changes over time (in
different frames), so this field should be the frame number where this
palette is displayed for first time in the [sprite](sprite.md#sprite).
different frames), so this field should be the frame number where the
palette is displayed for the first time in the [sprite](sprite.md#sprite).

## Palette:saveAs()

Expand Down
9 changes: 7 additions & 2 deletions api/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ function init(plugin)
onenabled=function()
...
return true | false
end,
onchecked=function()
...
return true | false
end
}
end
Expand All @@ -110,8 +114,9 @@ inside the `<menus>` element.
(clicked or an associated keyboard shortcut pressed).
* `onenabled`: Optional function to know if the command should be
available (enabled or disabled). It should return true if the
command can be executed right now. If this function is not specified
the command will be always available to be executed by the user.
command can be executed right now. If this function is not specified,
the command will always be available to be executed by the user.
* `onchecked`: Optional function to know if the command should be checked or not. The function is called every time the command is displayed in a menu (e.g: a dropdown is opened). It should return true if it is checked. If this function is not specified, the command will be unchecked.

## Plugin:newMenuGroup()

Expand Down
56 changes: 46 additions & 10 deletions api/sprite.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ Gets or sets the name of the file from where this sprite was loaded or
saved. Or an empty string if this is a new sprite without an
associated file.

## Sprite.id

```lua
local id = sprite.id
```

Returns the id of this sprite, as an integer.

## Sprite.isModified

```lua
Expand All @@ -114,8 +122,21 @@ local modified = sprite.isModified
Returns true if the sprite is modified compared to the latest saved
state on disk.

## Sprite.colorSpace

```lua
local colorspace = sprite.colorSpace
sprite.colorSpace = colorspace
```

Gets or sets the [color space](colorspace.md#colorspace) of this sprite. Setting works the same as using [Sprite:assignColorSpace()](sprite.md#spriteassigncolorspace).

## Sprite.colorMode

```lua
local colormode = sprite.colormode
```

Returns the [color mode](colormode.md#colormode) of this sprite.

## Sprite.spec
Expand All @@ -124,7 +145,23 @@ Returns the [color mode](colormode.md#colormode) of this sprite.
local spec = sprite.spec
```

The [specification](imagespec.md#imagespec) for image in this sprite.
Returns the [specification](imagespec.md#imagespec) for image in this sprite.

## Sprite.undoHistory.undoSteps

```lua
local undosteps = sprite.undoHistory.undoSteps
```

Returns the amount of undo steps (steps before the current step), as an integer.

## Sprite.undoHistory.redoSteps

```lua
local redosteps = sprite.undoHistory.redoSteps
```

Returns the amount of redo steps (steps after the current step), as an integer.

## Sprite.frames

Expand Down Expand Up @@ -326,7 +363,7 @@ sprite:setPalette(palette)

Changes the sprite [palette](palette.md#palette).

## Sprite:assignColorSpace
## Sprite:assignColorSpace()

```lua
local colorSpace = ColorSpace{ sRGB=true }
Expand All @@ -336,7 +373,7 @@ sprite:assignColorSpace(colorSpace)
Assign a new [color space](colorspace.md#colorspace) to the sprite without
modifying the sprite pixels.

## Sprite:convertColorSpace
## Sprite:convertColorSpace()

```lua
local colorSpace = ColorSpace{ sRGB=true }
Expand Down Expand Up @@ -543,13 +580,12 @@ events that don't support it.

Available events for a `Sprite`:

* `'change'`: When sprite content changed because we perform some
action on it (also called when we undo/redo those actions). Since
Aseprite v1.2.41, you can access `ev.fromUndo` property which is
`true` if the change came from a undo/redo/undo history event (and
not from a direct user change in the sprite).
* `'filenamechange'`: When the filename associated to a sprite
changes.
* `'change'`: When the sprite content changes because an action is performed on it (also called when those actions are undone/redone). Since Aseprite v1.2.41, you can access `ev.fromUndo` property which is `true` if the change came from a undo/redo/undo history event (and not from a direct user change in the sprite).
* `'filenamechange'`: When the filename associated to a sprite changes.
* `'layerblendmode'`: The blend mode of a layer is changed.
* `'layername'`: The name of a layer is changed.
* `'layeropacity'`: The opacity of a layer is changed.
* `'layervisibility'`: The visibility of a layer is changed.

## Sprite.tileManagementPlugin

Expand Down
2 changes: 1 addition & 1 deletion api/touchevent.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ coordinates, where (0,0) is the top-left corner of the canvas widget.

## TouchEvent.y

See [TouchEvent.x](#toucheventx)
See [TouchEvent.x](#toucheventx).

## TouchEvent.magnification

Expand Down
1 change: 1 addition & 0 deletions sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Constants
* [BrushType](api/brushtype.md#brushtype)
* [ColorMode](api/colormode.md#colormode)
* [FilterChannels](api/filterchannels.md#filterchannel)
* [FlipType](api/fliptype.md#fliptype)
* [Ink](api/ink.md#ink)
* [MouseButton](api/mousebutton.md#mousebutton)
* [MouseCursor](api/mousecursor.md#mousecursor)
Expand Down