File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # load all programs
2+ When group /group/ contains /...programs/ {
3+ Wish tag $group is stabilized
4+ foreach program $programs {
5+ # HACK: claim 'tag' specifically so it doesn't run twice
6+ Claim tag $program has a program
7+ }
8+ }
9+
10+ # figure out the text to display below
11+ When group /group/ contains /...programs/ &\
12+ the collected matches for [list /someone/ wishes /program/ is titled /title/] are /matches/ {
13+ set programTitles [dict create]
14+
15+ foreach match $matches {
16+ set programId [dict get $match program]
17+
18+ if {[lsearch $programs $programId] != -1} {
19+ dict set programTitles $programId [dict get $match title]
20+ }
21+ }
22+
23+ set programTitleText ""
24+
25+ foreach program $programs {
26+ set title [dict_getdef $programTitles $program "(no title)"]
27+ append programTitleText \n $program ": " $title
28+ }
29+
30+ Claim group $group has program titles $programTitleText
31+ }
32+
33+ # display said text
34+ When group /group/ has program titles /programTitles/ &\
35+ /group/ has region /r/ {
36+ set radians [region angle $r]
37+ set pos [region topleft [region move $r down 40px right 15px]]
38+ Wish to draw text with position $pos text $programTitles scale 0.7 radians $radians anchor topleft
39+ }
You can’t perform that action at this time.
0 commit comments