dankamongmen / panelreels

high-level objects built atop ncurses
https://nick-black.com/dankwiki/index.php/Outcurses
Apache License 2.0
8 stars 1 forks source link

Allow maximum size of panelreel to be specified #58

Open dankamongmen opened 4 years ago

dankamongmen commented 4 years ago

Allow the user to specify maximum dimensions of a panelreel in the options object. When sizing it, enforce the minimum, then enforce the margins as possible, then enforce the maximum. Center if all margins and maxima have been satisfied. Allow margin of -1 to indicate "as fair away as possible, while allowing it to grow through its maximum size".

Note that behavior when a maximum is specified is the same for all values x when rmargin == lmargin == x, so maybe we ought do something there.