Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
e07ca4e5
Commit
e07ca4e5
authored
Jul 14, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function documentation is done.
parent
35bfc724
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
285 additions
and
1 deletion
+285
-1
doc/function/chosen.txt
doc/function/chosen.txt
+17
-0
doc/function/combined_editor.txt
doc/function/combined_editor.txt
+44
-0
doc/function/drop_shadow.txt
doc/function/drop_shadow.txt
+24
-0
doc/function/enlarge.txt
doc/function/enlarge.txt
+1
-1
doc/function/exclusive_choice.txt
doc/function/exclusive_choice.txt
+29
-0
doc/function/filter_text.txt
doc/function/filter_text.txt
+3
-0
doc/function/image4.png
doc/function/image4.png
+0
-0
doc/function/image_drop_shadow_1.png
doc/function/image_drop_shadow_1.png
+0
-0
doc/function/image_drop_shadow_2.png
doc/function/image_drop_shadow_2.png
+0
-0
doc/function/process_english_hints.txt
doc/function/process_english_hints.txt
+31
-0
doc/function/remove_choice.txt
doc/function/remove_choice.txt
+28
-0
doc/function/require_choice.txt
doc/function/require_choice.txt
+29
-0
doc/function/require_exclusive_choice.txt
doc/function/require_exclusive_choice.txt
+26
-0
doc/function/symbol_variation.txt
doc/function/symbol_variation.txt
+53
-0
No files found.
doc/function/chosen.txt
View file @
e07ca4e5
Function: chosen
--Usage--
> chosen(choice: some_string, some_multiple_choice_value)
Is the given choice selected in the [[type:value#multiple_choice|multiple choice value]]?
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look in.
| @choice@ [[type:string]] Choice to look for.
--Examples--
> chosen(choice: "red", "red") == true
> chosen(choice: "red", "blue") == false
> chosen(choice: "red", "red, blue") == true
> chosen(choice: "blue", "red, blue") == true
doc/function/combined_editor.txt
View file @
e07ca4e5
Function: combined_editor
--Usage--
> forward_editor(field: some_text_value)
> combined_editor(field1: some_text_value, field2: some_text_value, ..., separtor1: some_string, ...)
Use one text field to edit one or more others.
This function must be used in the @script@ of a [[type:field#text|text field]].
This field will then contain the combined values of the given fields, separated by the separtors in <tt><sep></tt> tags.
When the field changes the underlying values are updated and vice versa.
Note: @forward_editor@ and @combined_editor@ are the same function.
--Parameters--
! Parameter Type Description
| @field@ [[type:value#text|text value]] Text value to edit
| @field1@ [[type:value#text|text value]] Another text value to edit
| @field2@ [[type:value#text|text value]] ''etc.''
| @separator@ [[type:string]] Separator between field 1 and 2
| @separator1@ [[type:string]] Multiple separators
| @separator2@ [[type:string]] Next separator, ''etc.''
| @hide when empty@ [[type:boolean]] Don't include separators if the entire value is empty.
| @soft before empty@ [[type:boolean]] Make separators 'soft' when the value folowing it is empty.
Soft separators are hidden by default and shown grayed when the field is selected.
--Examples--
>card field:
> ...
> script:
>> combined_editor(
>> field1: card.first_part
>> separator: " - "
>> field2: card.second_part
>> )
Forwarding just one field should be used in cases when two fields share a value, or when sometimes multiple fields are combined.
For example the Magic uses:
>> if set.include_automatic_card_numbers then
>> combined_editor(field1: card.copyright,
>> separator: "/",
>> field2: card.card_number)
>> else
>> forward_editor(field: card.copyright)
doc/function/drop_shadow.txt
View file @
e07ca4e5
Function: drop_shadow
--Usage--
> drop_shadow(image, offset_x: offset, offset_y: offset)
Add a drop shadow to an image.
--Parameters--
! Parameter Type Default Description
| @input@ [[type:image]] Image to add drop shadow to
| @offset_x@ [[type:double]] 0 Relative position of the shadow, a positive number moves the shadow to the left.<br />
Value is in the range 0 (no movement) to 1 (move by the width of the image)
| @offset_y@ [[type:double]] 0 Relative position of the shadow, a positive number moves the shadow down.<br />
Value is in the range 0 (no movement) to 1 (move by the height of the image)
| @blur_radius@ [[type:double]] 0 Amount to blur
| @alpha@ [[type:double]] 0 Opacity of the shadow, in the range 0 (fully transparent) to 1 (fully opaque)
| @color@ [[type:color]] black Color of the shadow
--Examples--
> drop_shadow("image4.png", offset_x: 0.08, offset_y: 0.08, alpha: 0.5) == [[Image]]
>>> drop_shadow(<img src="image4.png" alt='"image1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, offset_x: 0.08, offset_y: 0.08, alpha: 0.5) == <img src="image_drop_shadow_1.png" alt='"image_drop_shadow_1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
> drop_shadow("image4.png", offset_x: -0.1, offset_y: 0.1, alpha: 1, color: rgb(0,0,255), blur_radius: 0.05) == [[Image]]
>>> drop_shadow(<img src="image4.png" alt='"image1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, offset_x: -0.1, offset_y: 0.1, alpha: 1, color: rgb(0,0,255), blur_radius: 0.05) == <img src="image_drop_shadow_2.png" alt='"image_drop_shadow_1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
doc/function/enlarge.txt
View file @
e07ca4e5
...
...
@@ -13,4 +13,4 @@ The border size is given in percentages of the image size, so @border_size: 1@ m
--Examples--
> enlarge(input: "image1.png", border_size: 0.1) == [[Image]]
>>> enlarge(
ligh
t: <img src="image1.png" alt='"image1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, border_size: 0.1) == <img src="image_enlarge.png" alt='"image_enlarge.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
>>> enlarge(
inpu
t: <img src="image1.png" alt='"image1.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />, border_size: 0.1) == <img src="image_enlarge.png" alt='"image_enlarge.png"' style="border:1px solid black;vertical-align:middle;margin:1px;" />
doc/function/exclusive_choice.txt
0 → 100644
View file @
e07ca4e5
Function: exclusive_choice
--Usage--
> exclusive_choice(choices: some_strings, some_multiple_choice_value)
Requre that ''at most one'' of the given choices is selected in a [[type:value#multiple_choice|multiple choice value]].
If more then one is selected, deselects the last ones until one remains.
The choice that was just toggled in the GUI is never deselected if possible
If non of the choices is selected the selection stays the same.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look update.
| @choice@ [[type:string]] Choice to look for.
| @choice1@ [[type:string]] Exclusion between multiple choices.
| @choice2@ [[type:string]] ''etc.''
--Examples--
> exclusive_choice(choice1: "red", choice2: "green", "red, blue") == "red, blue"
> exclusive_choice(choice1: "red", choice2: "green", "red, green") == "red"
> exclusive_choice(choice1: "red", choice2: "green", "green, blue") == "green, blue"
> exclusive_choice(choice1: "red", choice2: "green", "black, blue") == "black, blue"
--See also--
| [[fun:require_choice]] Require that ''at least one'' of the given choices is selected.
| [[fun:require_exclusive_choice]] Require that ''exactly one'' of the given choices is selected.
| [[fun:remove_choice]] Remove the given choices from a multiple choice value.
doc/function/filter_text.txt
View file @
e07ca4e5
...
...
@@ -8,6 +8,9 @@ Filter text by only keeping the parts of the input that match the regular expres
If @in_context@ is given, the context must also match the string where the match is represented as <tt><match></tt>.
This function is available in [[script:rule form]].
When the filter is used many times the rule form is more efficient, because the regular expression is only compiled once.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] String to replace in.
...
...
doc/function/image4.png
0 → 100644
View file @
e07ca4e5
3.74 KB
doc/function/image_drop_shadow_1.png
0 → 100644
View file @
e07ca4e5
4.29 KB
doc/function/image_drop_shadow_2.png
0 → 100644
View file @
e07ca4e5
4.76 KB
doc/function/process_english_hints.txt
View file @
e07ca4e5
Function: process_english_hints
--Usage--
> process_english_hints(some_string_with_hints)
Process the hints left in the string by [[fun:english_number]] and by inserting keyword parameters.
There are two types of hints:
! Hint Description
| <tt><hint-1> Indicates that a number 1 was inserted, the following should be in singular form.
| <tt><hint-2> Indicates that a number not 1 was inserted, the following should be in plural form.
| <tt><param> Indicates that a keyword was inserted, if the text is @"a something"@ where something begins with a vowel,
turns it into @"an something"@.
For the plurality hints, the text following it can contain information on how to use it
! Code Example Description
| <tt>(...)</tt> <tt>house(s)</tt> When the thing preceding it is singular the contents of the parentheses are removed, otherwise they are kept.<br />
So this will result in @"house"@ or @"houses"@.
| <tt><singular>...</singular></tt> <tt><singular>mouse</singular></tt> Only kept when in singular mode.
| <tt><plural>...</plural></tt> <tt><plural>mice</plural></tt> Only kept when in plural mode.
--Parameters--
! Parameter Type Description
| @input@ [[type:tagged string]] String to process hints in.
--Examples--
> process_english_hints("a {param1}") == "a card"
> process_english_hints("a {param1}") == "an apple"
> process_english_hints("{english_number(1)} house(s)") == "one house"
> process_english_hints("{english_number(2)} house(s)") == "two houses"
> process_english_hints("{english_number(1)} <singular>mouse</singular><plural>mice</plural>") == "one mouse"
> process_english_hints("{english_number(1)} <singular>mouse</singular><plural>mice</plural>") == "two mice"
doc/function/remove_choice.txt
View file @
e07ca4e5
Function: remove_choice
--Usage--
> remove_choice(choice: some_strings, some_multiple_choice_value)
Deselect the given choice(s) from a [[type:value#multiple_choice|multiple choice value]],
returns the new value.
If a choice is not selected it is ignored.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look update.
| @choice@ [[type:string]] Choice to remove.
| @choice1@ [[type:string]] Remove multiple choices.
| @choice2@ [[type:string]] ''etc.''
--Examples--
> remove_choice(choice: "red", "red") == ""
> remove_choice(choice: "red", "blue") == "blue"
> remove_choice(choice: "red", "red, blue") == "blue"
> remove_choice(choice: "blue", "red, blue") == "red"
> remove_choice(choice1: "red", choice2: "green", "red, blue") == "blue"
--See also--
| [[fun:require_choice]] Require that at least one of the given choices is selected.
| [[fun:exclusive_choice]] Require that at most one of the given choices is selected.
| [[fun:require_exclusive_choice]] Require that exactly one of the given choices is selected.
\ No newline at end of file
doc/function/require_choice.txt
View file @
e07ca4e5
Function: require_choice
--Usage--
> require_choice(choices: some_strings, some_multiple_choice_value)
Requre that ''at least one'' of the given choices is selected in a [[type:value#multiple_choice|multiple choice value]].
If non of the choices is selected, selects the first one.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look update.
| @choice@ [[type:string]] Choice to require.
| @choice1@ [[type:string]] Require multiple choices.
| @choice2@ [[type:string]] ''etc.''
--Examples--
> require_choice(choice: "red", "red") == "red"
> require_choice(choice: "red", "blue") == "blue, red"
> require_choice(choice: "red", "red, blue") == "red, blue"
> require_choice(choice1: "red", choice2: "green", "red, blue") == "red, blue"
> require_choice(choice1: "red", choice2: "green", "red, green") == "red, blue"
> require_choice(choice1: "red", choice2: "green", "green, blue") == "green, blue"
> require_choice(choice1: "red", choice2: "green", "black, blue") == "black, blue, red"
--See also--
| [[fun:exclusive_choice]] Require that ''at most one'' of the given choices is selected.
| [[fun:require_exclusive_choice]] Require that ''exactly one'' of the given choices is selected.
| [[fun:remove_choice]] Remove the given choices from a multiple choice value.
doc/function/require_exclusive_choice.txt
0 → 100644
View file @
e07ca4e5
Function: require_exclusive_choice
--Usage--
>>> require_exclusive_choice(choices some_strings, some_multiple_choice_value)
Requre that ''exacttly one'' of the given choices is selected in a [[type:value#multiple_choice|multiple choice value]].
This is a combination of [[fun:require_choice]] and [[fun:exclusive_choice]].
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look update.
| @choice@ [[type:string]] Choice to require.
| @choice1@ [[type:string]] Require multiple choices.
| @choice2@ [[type:string]] ''etc.''
--Examples--
> require_exclusive_choice(choice1: "red", choice2: "green", "red, blue") == "red, blue"
> require_exclusive_choice(choice1: "red", choice2: "green", "red, green") == "red"
> require_exclusive_choice(choice1: "red", choice2: "green", "green, blue") == "green, blue"
> require_exclusive_choice(choice1: "red", choice2: "green", "black, blue") == "black, blue, red"
--See also--
| [[fun:require_choice]] Require that ''at least one'' of the given choices is selected.
| [[fun:exclusive_choice]] Require that ''at most one'' of the given choices is selected.
| [[fun:remove_choice]] Remove the given choices from a multiple choice value.
doc/function/symbol_variation.txt
View file @
e07ca4e5
Function: symbol_variation
--Usage--
> symbol_variation(symbol: symbol_value, variation: name_of_variation)
Render a [[type:symbol variation|variation]] of a symbol.
The variation name refers to one of the varations declared in the [[type:style]] of the symbol field.
> symbol_variation(symbol: symbol_value, border_radius: .., fill_type: .., ...)
Render a custom variation of a symbol.
Additional parameters corresponding to the properties of a [[type:symbol filter]] must be present.
--Parameters--
! Parameter Type Description
| @symbol@ [[type:value#symbol|symbol value]] Symbol to render.
| @variation@ [[type:string]] Name of the variation to use.
or
! Parameter Type Description
| @symbol@ [[type:value#symbol|symbol value]] Symbol to render.
| @border_radius@ [[type:double]] Border radius of the symbol.
| @fill_type@ @"solid"@ (default) Use the solid fill type, this is the default.
| @fill_color@ [[type:color]] Color to use for filling the symbol.
| @border_color@ [[type:color]] Color to use for the border of the symbol.
or
! Parameter Type Description
| @symbol@ [[type:value#symbol|symbol value]] Symbol to render.
| @border_radius@ [[type:double]] Border radius of the symbol.
| @fill_type@ @"linear gradient"@ Use the linear gradient fill type.
| @fill_color_1@ [[type:color]] Color to use for filling the symbol at the center of the gradient.
| @border_color_1@ [[type:color]] Color to use for the border of the symbol at the center of the gradient.
| @fill_color_2@ [[type:color]] Color to use for filling the symbol at the ends of the gradient.
| @border_color_2@ [[type:color]] Color to use for the border of the symbol at the ends of the gradient.
| @center_x@, @center_y@ [[type:double]] Position of the center point of the gradient (in the range 0 to 1)
| @end_x@, @end_y@ [[type:double]] Position of the end point of the gradient (in the range 0 to 1)
or
! Parameter Type Description
| @symbol@ [[type:value#symbol|symbol value]] Symbol to render.
| @border_radius@ [[type:double]] Border radius of the symbol.
| @fill_type@ @"radial gradient"@ Use the radial gradient fill type.
| @fill_color_1@ [[type:color]] Color to use for filling the symbol at the center of the symbol.
| @border_color_1@ [[type:color]] Color to use for the border of the symbol at the center of the symbol.
| @fill_color_2@ [[type:color]] Color to use for filling the symbol at the edges of the symbol.
| @border_color_2@ [[type:color]] Color to use for the border of the symbol at the edges of the symbol.
--Examples--
> symbol_variation(symbol: set.set_symbol, variation: "common") == [[Image]]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment