diff --git a/main.fs b/main.fs index 0c12ecf..5ccf402 100644 --- a/main.fs +++ b/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.