mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
The guides can no longer be undone
They were causing issues with UndoRedo, and with the latest changes, even crashes. I decided to remove their UndoRedo behavior, at least for now. Also put jegor377 to the list of Contributors.
This commit is contained in:
parent
086679f1f0
commit
1e4a5cff8e
|
@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
## [v0.7] - Unreleased
|
||||
This update has been brought to you by the contributions of:
|
||||
|
||||
Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Pesegoginski (MatheusPese), sapient-cogbag, Kinwailo
|
||||
Martin Novák (novhack), Darshan Phaldesai (luiq54), Schweini07, Marco Galli (Gaarco), Matheus Pesegoginski (MatheusPese), sapient-cogbag, Kinwailo, Igor Santarek (jegor377)
|
||||
|
||||
### Added
|
||||
- Cels are now in the timeline. Each cel refers to a specific layer AND a frame. Frames are a collection of cels for every layer.
|
||||
|
@ -19,6 +19,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Peseg
|
|||
- Users can now change keyboard shortcut bindings for tools, in the Preferences.
|
||||
- Importing .pngs as palettes is now possible.
|
||||
- A confirmation message now appears when the user quits Pixelorama, if there are unsaved changes.
|
||||
- The last edited project gets loaded at startup (toggleable in the Preferences), along with a new option in the File menu that also does this.
|
||||
- Templates and a lock aspect ratio option have been added to the "Create new image" dialog.
|
||||
- Locking layers is now possible. When a layer is locked, no changes can be made to it. Layers are unlocked by default.
|
||||
- Ability to get color for palette buttons, when editing a palette, from the currently selected left and right colors.
|
||||
|
@ -60,6 +61,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Peseg
|
|||
|
||||
### Removed
|
||||
- It's no longer possible for frames to have different amounts of layers. All frames have the same amount.
|
||||
- The guides no longer work with undo/redo.
|
||||
|
||||
## [v0.6.2] - 17-02-2020
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ func _ready() -> void:
|
|||
contributors.create_item(contributor_root).set_text(0, " Matheus Pesegoginski (MatheusPese)")
|
||||
contributors.create_item(contributor_root).set_text(0, " sapient_cogbag")
|
||||
contributors.create_item(contributor_root).set_text(0, " Kinwailo")
|
||||
contributors.create_item(contributor_root).set_text(0, " Igor Santarek (jegor377)")
|
||||
|
||||
var donors_root := donors.create_item()
|
||||
donors.create_item(donors_root).set_text(0, " pcmxms")
|
||||
|
|
|
@ -44,13 +44,6 @@ func _input(_event : InputEvent):
|
|||
Global.has_focus = true
|
||||
has_focus = false
|
||||
if !outside_canvas():
|
||||
Global.undos += 1
|
||||
Global.undo_redo.create_action("Move Guide")
|
||||
Global.undo_redo.add_do_method(self, "outside_canvas")
|
||||
Global.undo_redo.add_do_property(self, "points", points)
|
||||
Global.undo_redo.add_undo_property(self, "points", previous_points)
|
||||
Global.undo_redo.add_undo_method(self, "outside_canvas", true)
|
||||
Global.undo_redo.commit_action()
|
||||
update()
|
||||
|
||||
|
||||
|
@ -65,14 +58,8 @@ func _draw() -> void:
|
|||
draw_set_transform(Vector2(points[0].x + font.get_height() * zoom.y, Global.camera.offset.y - (viewport_size.y / 2.25) * zoom.y), rotation, zoom * 2)
|
||||
draw_string(font, Vector2.ZERO, "%spx" % str(round(mouse_pos.x)))
|
||||
|
||||
func outside_canvas(undo := false) -> bool:
|
||||
if undo:
|
||||
Global.undos -= 1
|
||||
Global.notification_label("Move Guide")
|
||||
if Global.control.redone:
|
||||
if Global.undos < Global.undo_redo.get_version(): # If we did undo and then redo
|
||||
Global.undos = Global.undo_redo.get_version()
|
||||
Global.notification_label("Move Guide")
|
||||
|
||||
func outside_canvas() -> bool:
|
||||
if type == Types.HORIZONTAL:
|
||||
if points[0].y < 0 || points[0].y > Global.canvas.size.y:
|
||||
queue_free()
|
||||
|
@ -83,5 +70,6 @@ func outside_canvas(undo := false) -> bool:
|
|||
return true
|
||||
return false
|
||||
|
||||
|
||||
func point_in_rectangle(p : Vector2, coord1 : Vector2, coord2 : Vector2) -> bool:
|
||||
return p.x > coord1.x && p.y > coord1.y && p.x < coord2.x && p.y < coord2.y
|
||||
|
|
Loading…
Reference in a new issue