Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BrodyDuderson

Pages: [1]
1
When I toggle into full screen, the lines for drawn boxes become really thin. Is there anyway to prevent that?

2
Just remember that dimensions_t returned from print/measure is a size, not coordinates, so you have to add it to the last printing position.
What is the proper way to do this for wrapped text? Everything I've tried has been off so far and I can't figure out why.

It's true that I might not need to do this anymore, now that you made me aware of string formatting + concatenate. It would be nice to know, just in case.

Thanks for the help, and thanks for bearlibterminal. It's great.

3
A somewhat related question. My "game" has color themes that the user can choose from. So for example, I do things like
 
Code: [Select]
terminal_bkcolor(activeTheme->bkColor);
Say I wanted to change the color of one of the words in awesomeText to a custom color (activeTheme->crazyColor). What would be the best way to do it?

4
What is the best way to start printing where the last print left off? I've been using the measure function but things aren't lining up properly. I think I'm just not using it properly. Here's an example of how I've been trying to use it.

Code: [Select]
#define TEXT_WIDTH 60
#define TEXT_HEIGHT 30
#define TEXT_X ((SCREEN_WIDTH / 2) - (TEXT_WIDTH / 2))
#define TEXT_Y 2

char *awesomeText= "I don't know anything about anything. In fact, I can't even say for sure if what I just said is true; and truth be told, I'm not even sure if I can or cannot say anything for sure. I think - not know - that you should, perhaps, ignore me, maybe.";

terminal_print_ext(TEXT_X, TEXT_Y, TEXT_WIDTH, 0, 0, awesomeText);

dimensions_t mark = terminal_measure_ext(TEXT_WIDTH, TEXT_HEIGHT, awesomeText);

terminal_print_ext(mark.width, mark.height, 0, 0, 0, "[color=red]@");

When I do this, the aweomseText is wrapped correctly but the red @ is printed on the second - at "I think - not know -", rather than the end of the string.

Pages: [1]