add device counter to tab bar
This commit is contained in:
parent
7eee62f5da
commit
75cc5ec09e
10
main.fs
10
main.fs
|
@ -247,9 +247,16 @@ S" you feel like throwing some stuff into the pool." set-message
|
|||
: draw-tab-keys
|
||||
." (use < and > to switch tabs) " ;
|
||||
|
||||
|
||||
\ draw-tab-devices draws the device count on the tab bar
|
||||
: draw-tab-devices
|
||||
devices f@ f>s dup ." [" .
|
||||
1 = if ." Device ]" else ." Devices] " then ;
|
||||
|
||||
\ draw-tab-bar draws the tab bar. TODO make this into smaller words
|
||||
: draw-tab-bar ( x y -- )
|
||||
: draw-tab-bar ( x y -- x y )
|
||||
2dup at-xy
|
||||
clear-line
|
||||
screens @ if \ 0 is false in forth, so if the number of screens is zero, don't draw the bar.
|
||||
screens @ 1+ 0 do
|
||||
i dup
|
||||
|
@ -260,6 +267,7 @@ S" you feel like throwing some stuff into the pool." set-message
|
|||
draw-screen-name
|
||||
loop inc-y
|
||||
draw-tab-keys
|
||||
draw-tab-devices
|
||||
then ;
|
||||
|
||||
\ draw-message draws the stored message on the screen.
|
||||
|
|
Reference in New Issue