Commit graph

10 commits

Author SHA1 Message Date
Victor Seiji Hariki
6ec27df919 add some guards to input handlers to easier debug
Sometimes before this I used mouse.listen.window.left.onclick = () =>
{thing}. Now it throws an error telling me not to do this.

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2022-11-28 10:08:47 -03:00
Victor Seiji Hariki
fe2ebec569 Mask now colorful depending on inversion
Blue masking means SD will try to keep image as-is under the mask. Red
masking means SD will try to replace whatever is under the mask. (Red is
default masking, Blue is inverted masking)

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2022-11-26 22:35:16 -03:00
Victor Seiji Hariki
72ebe5ba21
some fixes and comments
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
(cherry picked from commit 6299b561f196a7c78c66a8d21b2e1b27cecdee77)
2022-11-25 19:23:22 -03:00
Victor Seiji Hariki
df5dc32eee Some quick lunch patches
Allows for selections and dreams to be sent to the resource manager,
allows resource deselection when clicking on the currently selected
item, put some extra comments and allow saving of a selected canvas area

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 963312115d4827de1c8d4fac88a97dd64db7fa15
2022-11-25 13:16:22 -03:00
Victor Seiji Hariki
42144ea577 allow shortcut deletion via callback
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 0a46ffda9945ad95665634c21c9732e7d9d1497e
2022-11-24 12:30:13 -03:00
Victor Seiji Hariki
951fbacd6c non-broken version on input-rework
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 3c337c8cf8d4a65cb2fe0845f6eaf9315eb21ae7
2022-11-24 01:53:14 -03:00
Victor Seiji Hariki
250c833895 Added tool menu and migrated image generation ot new input
Also updates a lot of other things (brush size now independent from
scale factor, split some files, and a lot other things; removed erase
safeguard as now erase is supported by undo/redo; tried adding github
prettier autoformatting to pull requests;

may have some other things as well

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 0ba21f23c69f9dca2c3189a838b945900b01f81d
2022-11-22 19:28:27 -03:00
Victor Seiji Hariki
87ea1be32d add history list view and interaction
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 7064b38c9663c0219424b4864243f16d4aa68a24
2022-11-22 02:16:17 -03:00
Victor Seiji Hariki
1d6d2c1978 add keyboard support to input
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2022-11-21 23:19:41 -03:00
Victor Seiji Hariki
ea64c138c3 Add generic mouse input handler
input.js is now responsible for processing mouse input and translating
it to relevant events. This allows for less bloat on the main logic in
index.js and easy implementation of new functionality

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2022-11-20 23:03:07 -03:00