Files
Bubberstation/code/modules/tgui
Y0SH1M4S73R 5efeedbad9 [TM First] Paint Canvas Refactor (powered by the Universal Icon Editing Framework) (#94797)
## About The Pull Request

This PR adds a universal framework for editing sprites, and adds an
example implementation by way of porting paint canvases to it. This
should have no impact on serializing paintings in the database. As part
of this canvas refactor, zooming in and out of a canvas is now handled
entirely on the client side.

The paint palette component has also been refactored to allow a variable
number of colors up to the specified maximum, instead of populating all
color slots to start out with.

Some features of the sprite editing framework are unused in this PR, as
they were not necessary for feature parity with the current
implementation of paintings. However, they remain present for use in
future PRs, such as a PDA painting app that was separated out of this
branch for atomicity. These features include:
- Eraser tool
- Undo history
- Layers
- Multi-dir icon support

Support for animated icons is not present, but planned to be added when
a new feature needs it.

### New Painting UI Screenshot:
<img width="1210" height="596" alt="NewCanvasUiDemo"
src="https://github.com/user-attachments/assets/4181745b-716b-4068-b3a2-d2491e5abf09"
/>

## Why It's Good For The Game

This framework opens the possibility for a wide variety of new features,
such as Goofball's planned tailoring mechanic. Additionally, the
consolidation of all the controls into a single window should make
painting more user-friendly.

## Changelog

🆑
refactor: Painting has been significantly refactored with a new UI that
should provide every painting control you need without having to unfocus
the UI window. Please report any issues.
refactor: Items that can store paint palettes now start with no colors.
Colors can be added to and removed from the item's palette, up to the
number of colors they previously stored.
/🆑

---------

Co-authored-by: Jordan Dominion <dominion@tgstation13.org>
2026-02-01 14:51:58 -05:00
..