Skip to content
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

Using get_height_rect without an existing console #67

Closed
FractalWire opened this issue Feb 24, 2019 · 1 comment
Closed

Using get_height_rect without an existing console #67

FractalWire opened this issue Feb 24, 2019 · 1 comment
Assignees

Comments

@FractalWire
Copy link

So, I'm having a case where I'd like to use get_height_rect without an existing console, or at least, with a console of (width=0, height=0).
This console is basically use to hold the content of a print_box function, and that's it. This is a console dedicated to the content of a tooltip with variable value.

But if I want to use print_box, I'd need to know and set the height of the console before using the print_box function. Get_height_rect would be perfect here but if we use it on a Console(0,0), the only value we'd get is 0.

Any Idea how I could work around that ? I could implement my own print_box function in python, but it would not be as efficient as print_box I guess.

@HexDecimal HexDecimal self-assigned this Feb 24, 2019
@HexDecimal
Copy link
Collaborator

I'll go ahead and write a function which doesn't require a console.

Python's textwrap module could be used to replace libtcod's text wrapper if you ever needed to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants