Commit 2b4d46d8 authored by Bernd Paysan's avatar Bernd Paysan

Work on album viewer

parent 07831ed6
......@@ -38,6 +38,7 @@ $FF8888FF re-text-color obj-red
$444444FF re-color edit-bg
$408040FF re-color send-color
$333333FF re-color users-color#
$000000CC re-color album-bg-col#
8 0 [DO]
imports#rgb-bg [I] sfloats + sf@ floor f>s to color,#
......
......@@ -216,6 +216,7 @@ $000000FF new-color, FValue otr-col#
$FFFFFFFF new-color, FValue chat-col#
$80FFFFFF new-color, FValue chat-bg-col#
$FFFFFFFF new-color, FValue posting-bg-col#
$FFFFFFCC new-color, FValue album-bg-col#
: entropy-colorize ( -- )
prev-text$ erase addr prev-text$ $free
......@@ -442,12 +443,13 @@ Variable user-avatar#
Variable dummy-thumb#
Variable user.png$
Variable thumb.png$
: ]path ( addr u -- )
open-fpath-file throw rot close-file throw ]] SLiteral [[
] ;
: read-user.png ( -- )
"net2o/doc/user.png" open-fpath-file throw 2drop
dup >r user.png$ $slurp r> close-file throw ;
[ "doc/user.png" ]path user.png$ $slurp-file ;
: read-thumb.png ( -- )
"net2o/doc/thumb.png" open-fpath-file throw 2drop
dup >r thumb.png$ $slurp r> close-file throw ;
[ "doc/thumb.png" ]path thumb.png$ $slurp-file ;
: user-avatar ( -- addr )
user-avatar# @ 0= IF
read-user.png user.png$ $@ mem>thumb atlas-region
......@@ -1061,6 +1063,31 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
hash: imgs# \ hash of tables of
: prev-img ;
: next-img ;
: /mid ( o -- o' )
>r {{ glue*l }}glue r> /center glue*l }}glue }}v box[] >bl ;
{{
glue*wh album-bg-col# slide-frame dup .button1
{{
tex: img0 ' img0 "doc/thumb.png" 0.666e }}image-file drop /mid
tex: img1 ' img1 "doc/thumb.png" 0.666e }}image-file drop /mid /hflip
tex: img2 ' img2 "doc/thumb.png" 0.666e }}image-file drop /mid /hflip
tex: img3 ' img3 "doc/thumb.png" 0.666e }}image-file drop /mid /hflip
}}h
{{
glue*ll }}glue
{{ \large
"" }}text ' prev-img 0 click[]
glue*ll }}glue
"" }}text ' next-img 0 click[]
}}h box[]
glue*ll }}glue
}}v box[]
}}z box[] Constant album-viewer
: .imgs ( -- )
imgs# [: dup $. ." :" cr
cell+ $@ bounds ?DO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment