Highs and Lows - Printable Version +- yab | yet another Basic for HAIKU (https://yab.orgfree.com/forum) +-- Forum: Programming in yab (https://yab.orgfree.com/forum/forumdisplay.php?fid=1) +--- Forum: Help with programs (https://yab.orgfree.com/forum/forumdisplay.php?fid=4) +--- Thread: Highs and Lows (/showthread.php?tid=125) |
Highs and Lows - MrEntropy - 05-03-2020 Hello folks, Having finished (for now) Dungeon of Danger, I'm looking at my next project: porting Telengard from TRS-80 BASIC to Yab. For this one, I've implented new PRINT statements to work on a View. However, I realize that I'm going to have to use inverse video (well, not have to, but it would be nice) but I can't figure out how to get that to work. I know I can DRAW SET BGColor and HighColor to get that classic 'green on black' look, but no matter what I try, I can't get black on green, unless I set BGColor to green, which isn't useful because it turns the entire view's color to green. I see there's a LowColor, and I have no idea what that's for. So... is there an easy way to draw text while mixing background/foreground colors? Thanks! RE: Highs and Lows - bbjimmy - 05-12-2020 The only way I can see is to convert your reverse text to an image. The files in the zip are quite ugly, but can change a line of text to an image. Your milage may vary. RE: Highs and Lows - MrEntropy - 05-26-2020 Cool. Thanks. I'llhave a look at it. I don't know if I'll be able to use it, though, because of the way things get placed on the screen. I'm really surprised there's no way of defining a foreground and background color for text. It's been a while since I've been able to get time to work on this, so hopefully I won't have forgotten everything I've done so far! RE: Highs and Lows - lelldorin - 05-28-2020 There are limitations with bgcolor using on buttons and other Widgets. We Lost here something in yab, back in the days. But you can make the bgcolor to green and using high and lowcolor to make the Text Black. RE: Highs and Lows - MrEntropy - 06-05-2020 "But you can make the bgcolor to green and using high and lowcolor to make the Text Black." What does low color do, exactly? But when I change the bgcolor, then the entire view changes to green. I just need the color behind the text to change to green. RE: Highs and Lows - bbjimmy - 06-05-2020 Do you have s screenshot of what you want to accomplish? RE: Highs and Lows - MrEntropy - 06-07-2020 Sure. The editor won't let me insert graphics, so I added two attachments. One is from an Atari screen, where the '2.5' and 'RETURN' are in inverse. The other is from the Apple ][ where 'File handling routines' is in inverse. Also, at least one Reply button is broken. I don't know if anyone knows that. RE: Highs and Lows - bbjimmy - 06-12-2020 I found a rather crude method using images and a separate file to create the images from the text, see the attatched zip |