in reply to Center curses output
Is this a Perl question? In order to get a useful answer you probably have to provide some details about your app.
If your question is simply: on a screen of width $w and height $h and a centered window of 80x25, how wide is my left and top margin (or bottom?), the following should be helpful:
$left = ($w - 80) / 2; $top = ($h - 25) / 2;
which both might be negative on a small screen.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Center curses output
by 2teez (Vicar) on Jul 04, 2013 at 06:38 UTC | |
by hdb (Monsignor) on Jul 04, 2013 at 06:41 UTC |