nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Feature request: Ability to choose cell anchors #86

Closed silversquirl closed 7 years ago

silversquirl commented 7 years ago

I'd like the ability to choose how to pack my cells into the given space when using tb_blit.

Specifically, I'd like to be able to pack them into the left top, left bottom (default), right top, right bottom and possibly left center, right center, center top, center bottom and center.

Sorry if this is already possible.

nsf commented 7 years ago

Read comments here: https://github.com/nsf/termbox/blob/master/src/termbox.h#L216-L229

tb_blit is deprecated in favor of direct back buffer access via tb_cell_buffer. You can now implement any copying function you want yourself.

See implementations also: https://github.com/nsf/termbox/blob/master/src/termbox.c#L246-L283

silversquirl commented 7 years ago

Ahh, thanks, I didn't realise tb_blit was deprecated, but that does explain why I was unable to find it in any examples ;)