diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-11 10:38:13 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-11 10:38:13 -0700 |
commit | 3d5ca62a383426ef5874c616fdc84bad3f90cc48 (patch) | |
tree | 191bd2a31bf26f38223f0f5cebde49eef3b30a7e /browse-slack | |
parent | 8aa407a974589df317035ad917c80a685a13f856 (diff) | |
download | mu-3d5ca62a383426ef5874c616fdc84bad3f90cc48.tar.gz |
slack: show channel for each item
Diffstat (limited to 'browse-slack')
-rw-r--r-- | browse-slack/environment.mu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu index 9d2ca460..fb944563 100644 --- a/browse-slack/environment.mu +++ b/browse-slack/environment.mu @@ -26,6 +26,7 @@ type tab { # avatar-space-hor # in characters # author-name-padding-ver # in characters # post-right-coord # in characters +# channel-offset-x # in characters fn render-environment screen: (addr screen), env: (addr environment), users: (addr array user), channels: (addr array channel), _items: (addr array item) { clear-screen screen @@ -70,6 +71,12 @@ fn render-item screen: (addr screen), _item: (addr item), _users: (addr array us y <- shift-left 4/log2font-height render-image screen, author-avatar, 0x18/item-padding-hor, y, 0x50/avatar-side, 0x50/avatar-side } + # channel + var channel-name-ah/eax: (addr handle array byte) <- get item, channel + var channel-name/eax: (addr array byte) <- lookup *channel-name-ah + set-cursor-position screen, 0x40/channel-offset-x y + draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "#", 7/grey 0/black + draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, channel-name, 7/grey 0/black # author name var author-real-name-ah/eax: (addr handle array byte) <- get author, real-name var author-real-name/eax: (addr array byte) <- lookup *author-real-name-ah |