Gen modules integration (#54)

genevensis frames magic-modules integration
This commit is contained in:
GenevensiS
2024-09-17 18:05:00 +02:00
committed by GitHub
parent 8350a8663e
commit e77bb8ec38
3657 changed files with 1911 additions and 1398 deletions

View File

@@ -90,6 +90,12 @@ clamp := {
}
round_up := {to_int(0.99999999999998+input)} #### 0.99999999999999 == 1, leave the 8
round_near := {to_int(0.5+input)}
to_number_lax :=
{
input := trim(input)
if input == "" or input == "-" then input := 0
to_number(input)
}
#### reads from a comma separated list like an array
pull_comma_array := {
array := split_text(input, match:divider)
@@ -2801,6 +2807,7 @@ corners_possible_dimensions :=
"1039x744": "1039x744"
"750x1046": "750x1046"
"1046x750": "1046x750"
"1500x1046": "1500x1046"
]
corners_disabled_1 := { false }
@@ -4059,8 +4066,8 @@ swap_font_color := {
nums := split_text(test, match:",")
test_color := nil
if length(nums) >= 4 then test_color := rgba(nums.0, nums.1, nums.2, nums.3) or else nil
if test_color == nil and length(nums) >= 3 then test_color := rgb(nums.0, nums.1, nums.2) or else nil
if length(nums) >= 4 then test_color := rgba(to_number_lax(nums.0), to_number_lax(nums.1), to_number_lax(nums.2), to_number_lax(nums.3)) or else nil
if test_color == nil and length(nums) >= 3 then test_color := rgb(to_number_lax(nums.0), to_number_lax(nums.1), to_number_lax(nums.2)) or else nil
if test_color == nil and test != "" then test_color := to_color(test) or else nil
if test_color != nil then font_color := test_color
) else ""