• Lightbar question

    From Alpha@21:1/182 to Apam on Thu Mar 18 00:08:06 2021
    Apam,

    Just curious about how, technically, lightbars work. Do you have to
    re-draw each affected row -- basically decrement the Y positions,
    triggered by arrow keys, page up, etc.? Plus, change the
    foreground/background colors for the "active" rows? Phew!

    Really digging them in Talisman.


    |07 ALPHA
    |08 The Drunken Gamer BBS

    --- Talisman v0.13-dev (Linux/x86_64)
    * Origin: HappyLand v2.0 - telnet://happylandbbs.com:11892/ (21:1/182)
  • From apam@21:1/182 to Alpha on Thu Mar 18 11:49:14 2021
    Just curious about how, technically, lightbars work. Do you have to
    re-draw each affected row -- basically decrement the Y positions,
    triggered by arrow keys, page up, etc.? Plus, change the foreground/background colors for the "active" rows? Phew!

    Pretty much. I keep track of the start (the first row) the selected row
    and the height of the terminal.

    Then it is more or less, if the start changes, it needs to redraw the
    whole screen, else just change the previously selected and newly selected
    lines each time an arrow key is selected.

    Now you mentioned it, I haven't added page up etc, i probably should.

    Andrew

    --
    |03Andrew Pamment |08(|11apam|08)
    |13Happy|10Land |14v2.0|08!


    --- Talisman v0.13-dev (Linux/x86_64)
    * Origin: HappyLand v2.0 - telnet://happylandbbs.com:11892/ (21:1/182)