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

Support dynamic panelreel focus #60

Closed dankamongmen closed 4 years ago

dankamongmen commented 4 years ago

Right now, the focused tablet is always drawn at the top of the panelreel. The rules ought instead be:

dankamongmen commented 4 years ago

Two problems immediately come up:

dankamongmen commented 4 years ago

This is mostly working. Still needing resolution:

Ideally I can knock these out tonight, and this will be done!

dankamongmen commented 4 years ago

With regards to the "weirdness at the top of the reel": the most fundamental thing i'm seeing is that we're always off by one regarding the lines we print; we print up the penultimate one pretty much all the time when clipped at the top:

╭────────────────────────────────────────────────────────────────────────╮
│[#3 23 lines 0/16] 88888888888888888888888888888888888888888888888888888│
│999999999999999999999999999999999999999999999999999999999999999999999999│
│aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│
│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│
│cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc│
│dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd│
│eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee│
│ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff│
│000000000000000000000000000000000000000000000000000000000000000000000000│
│111111111111111111111111111111111111111111111111111111111111111111111111│
│222222222222222222222222222222222222222222222222222222222222222222222222│
│333333333333333333333333333333333333333333333333333333333333333333333333│
│444444444444444444444444444444444444444444444444444444444444444444444444│
│555555555555555555555555555555555555555555555555555555555555555555555555│
│666666666666666666666666666666666666666666666666666666666666666666666666│
╰────────────────────────────────────────────────────────────────────────╯

here we have 23 (0x17) lines, and thus we ought be seeing 9..23 rather than 8..22. though really, of course, we ought be seeing 8..22, and that top border ought be clipped.

dankamongmen commented 4 years ago

Closing this, and making new bugs for the issues we're seeing.