-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) feat!: rework DrawObject
s
#29
base: main
Are you sure you want to change the base?
Conversation
DrawObject
sDrawObject
s
0544aa3
to
38c259e
Compare
Reasoning: code is getting too long and confusing + many stuff gets simply reused but a bit differently. This simplifies things quite a lot. It's possible to add another painter for simple single-line texts, which in turn would be probably faster than this type of implementation anyways.
3dd9fc7
to
5781ead
Compare
64d4fcc
to
54e6eba
Compare
…ainter Following changes were made: - `TextPainter` now automatically detects whether someone explicitely set `width` **and** `height` in options, and if so – sets `overwriteRectangle` to `true` (if unspecified in options!) - This removes `SignalOfObject` type, as it was malfunctioning and made working with signal types a headache. - `Label` now auto detects `multiCodePointSupport` and `overwriteRectangle` the same way `TextPainter` does - `Button` now uses `TextPainter` and doesn't use Label as `subComponent` - Added `unsignalify()` function to `utils/signals.ts` - Added `doesOverwriteRectangle()` function to `utils/painter.ts`
Is this completely dead? |
This PR, probably. Tui in itself? Not really |
Alright, I understand. I really like the concept of this library and its relative novelty, especially in the Deno space. I haven't seen many good alternatives in the Node ecosystem either. However, I've encountered some bugs with rendering and other areas. These might not warrant issues right now, considering a rewrite is planned. If you develop a more stable design for the project and have a clear vision for its overall feel, I'd be willing to help with some implementations. While I don't have extensive experience in this terminal rendering aspect, I'd be eager to contribute and learn. |
This PR is meant to replace
DrawObject
s withPainter
s.Main changes that are planned include:
Drawable
interface, which hasdraw()
method. This will allow for easier interception and/or manipulation of drawing on canvas.BoxObject
andTextObject
will now useBoxPainter
andTextPainter
names.TextObject
will use normal rectangle, and will allow for multiline text drawing, simplifying component creation that use text by a lot.ShapePainter
class that will allow for drawing on canvas using 2d array, allowing things likeFrame
to use only one component instead of combining multiple – again simplyfying component creationrerender()
gets called