-
Notifications
You must be signed in to change notification settings - Fork 156
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
256 color terminal support #19
Comments
Yes! But not yet. I first need more free time, and then I'll have to address the following issues:
Cheers. |
I would like to point out these articles: |
What do you expect to be able to do with 256/true color support? |
Is this question about wider color support or moreabout general Sixel graphics? |
As I understand it, the OP's question is about text-mode color (https://gist.github.com/XVilka/8346728). I do not intend to support Sixel graphics. |
I had given some thought to how tvision on modern platforms might support extended colors in palettes, as I'm interested in that too. I'm willing to subclass all the controls and copy-paste their I noticed that blink doesn't work in a lot of modern terminals, and there's a bit dedicated to blink in palette color definitions. I don't think any of the built-in controls use blinking text (correct me if I'm wrong). Could a compile-time define allow that blink bit to be repurposed to mean "take the rest of the bits and use it as an index into an extended palette" where the extended palette has a similar structure, but with either 2-byte (256 color fg/bg) or 6-byte (24-bit) entries? With the compile-time symbol not defined, it would exclude that logic and the extended palette array and continue to do what tvision does now. Just a thought; I haven't looked into it very deeply, but I'm interested. |
Oh, I have a second unrelated use case in TMBASIC. I want the user to be able to write TUI apps or full-screen console apps (e.g. colorful text-based games like ZZT), but critically I'd also like the ability to combine the two and have tvision dialogs floating above full-screen console games. Imagine like a betting window for a blackjack game that floats above a custom-drawn blackjack table. If tvision supports extended colors, I think I could run everything under tvision and simply draw onto the desktop for custom-drawn stuff, and then it's no big deal to occasionally pop dialogs up on top of it. In the absence of this support, I don't know how I'd pull it off if I wanted more than tvision's 8 bg and 16 fg colors; I think I'd have to make TUI and full-screen drawing mutually exclusive, using tvision for the former and using ncurses directly for the latter. |
Thank you everyone for the comments. Integrating extended color support into the Turbo Vision API affects two different parts of the original API:
I can confirm this will be possible at least by manipulating Cheers. |
This sounds like a great approach; I like this. It's probably cleaner than hijacking the blink bit. Implementing my own Would my Very nice demo image. I'm excited about the possibilities! |
This turns out to be too much of a disadvantage. Just think in how many classes we'd have to override the It's not worth the effort. So I think it's a good idea to keep on using palettes instead of overriding |
st 24. 2. 2021 v 18:09 odesílatel magiblot <[email protected]>
napsal:
But bypassing the Palette API implies that any palette-switching
functionality will have to be implemented manually by the application.
This turns out to be too much of a disadvantage. Just think in how many
classes we'd have to override the mapColor method to get the bottom panel
right in this dialog:
[image: Screenshot_20210224_175029]
<https://user-images.githubusercontent.com/20713561/109035732-397e1380-76c9-11eb-804c-18ba23c3ebcc.png>
It's not worth the effort. So I think it's a good idea to keep on using
palettes instead of overriding mapColor. I found a way to accomplish this
without increasing complexity:
[image: Screenshot_20210224_174047]
<https://user-images.githubusercontent.com/20713561/109036204-a72a3f80-76c9-11eb-8906-55a27d246280.png>
—
This looks pretty well
You are receiving this because you are subscribed to this thread.
… Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEFO42Y526BGBFNFERMHK3TAUXFZANCNFSM4SU63LNA>
.
|
FWIW, I'm probably already going to subclass all of the views that ship with tvision to add hooks for the BASIC bindings. It may be too much hassle for apps that just want to cook up a tvision GUI with fancy colors, but at least for TMBASIC's purposes I'm willing to do it since I'll do it once and they will serve all the BASIC programs the same way. I didn't mention it above but the limit of 256 palette entries is kind of an issue on its own; unless I subclass and override
These six window styles already consume half of the available palette entries. I had to evict In Visual Basic for DOS (and in modern Windows Forms) there is no concept of a palette, they just have a foreground and background color for each view that you can change individually. I wonder if an alternative solution here is to do something like that. What I really want is just the ability to set fields in, e.g., |
So what about split this type into two? Is it feasible ? |
I've pushed extended color support into the colors branch. I'd like to make sure it doesn't break anything in @electroly's project (the only active one I know of) before merging it into master. There's a new section at the end of the README that explains briefly how it works. Basically, it comes down to the following:
Turbo Vision takes care of mapping the provided colors to the current terminal capabilities. Client applications need not worry about this. Speaking of terminal capabilities: for the moment, these are only detected properly on Unix systems (where Ncurses/Termcap/Terminfo are widely used). Windows applications are capped to 16 colors because I have yet to investigate what can be done there (although setting the Unfortunately, I haven't yet published any application that allows you to play with these features, so you'll either have to wait or attempt to write one yourselves. Cheers. |
I updated to tvision commit 79182b1 and ran a build and test on all platforms, no problems at all. Looks good! I'll give the new capabilities a try. |
Great! |
I suspect the answer is "no", but is there any chance to have 256 color support in the future?
Thanks!
The text was updated successfully, but these errors were encountered: