Skip to content

Commit

Permalink
Merge pull request #181 from FolkComputer/ac/singleLlabel
Browse files Browse the repository at this point in the history
Add single l label with a warning
  • Loading branch information
cwervo authored Dec 2, 2024
2 parents 7e3e151 + 0332fe9 commit d74eb51
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion virtual-programs/label.folk
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
set singleLWarning "Use labelled with two l's"

When /thing/ has region /region/ {
lassign [region centroid $region] x y
set radians [region angle $region]

When the collected matches for [list /someone/ wishes $thing is labelled /text/ with font /font/] are /matches/ {
set text [join [lmap match $matches {dict get $match text}] "\n"]
if {$text eq ""} { return }
Expand All @@ -10,6 +12,11 @@ When /thing/ has region /region/ {
}
}

When /someone/ wishes /thing/ is labeled /text/ {
Wish $thing is labelled $text
Claim $thing has warning $singleLWarning with info $singleLWarning
}

When /someone/ wishes /thing/ is labelled /text/ {
# Set the default font
Wish $thing is labelled $text with font "PTSans-Regular"
Expand Down

0 comments on commit d74eb51

Please sign in to comment.