mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
convert to CRLF line endings
This commit is contained in:
+10
-10
@@ -33,16 +33,16 @@ A heirachical file can contain a reference to another file:
|
||||
Where filename must be an absolute or relative [[type:filename]].
|
||||
|
||||
That file is included literally into the current one; except for indentation, the included file never escapes from the level the 'include file' line is on.
|
||||
|
||||
If the file to be included can vary depending on the locale that is selected, use:
|
||||
>>>include localized file: <em>filename</em>
|
||||
MSE will take the filename and add "_" followed by the name of the currently selected locale at the end of it.
|
||||
So for example, if the locale used is the folder "en.mse-locale", the file that will be included is "filename_en"
|
||||
You must provide a version of the file for each locale found in the data folder, even if it is simply a copy of the english one.
|
||||
|
||||
If the file to be included can vary depending on if dark mode is selected, use:
|
||||
>>>include dark file: <em>filename</em>
|
||||
MSE will take the filename and add "_dark" if the app is currently in dark mode. If not, then nothing is added to the filename.
|
||||
|
||||
If the file to be included can vary depending on the locale that is selected, use:
|
||||
>>>include localized file: <em>filename</em>
|
||||
MSE will take the filename and add "_" followed by the name of the currently selected locale at the end of it.
|
||||
So for example, if the locale used is the folder "en.mse-locale", the file that will be included is "filename_en"
|
||||
You must provide a version of the file for each locale found in the data folder, even if it is simply a copy of the english one.
|
||||
|
||||
If the file to be included can vary depending on if dark mode is selected, use:
|
||||
>>>include dark file: <em>filename</em>
|
||||
MSE will take the filename and add "_dark" if the app is currently in dark mode. If not, then nothing is added to the filename.
|
||||
|
||||
--Example--
|
||||
For example, a [[type:set]] might look like this:
|
||||
|
||||
@@ -6,10 +6,10 @@ Function: new_card
|
||||
Creates a new [[type:card]] object. The card is not automatically added to a set. Use the [[fun:add_card_to_set]] function for that.
|
||||
|
||||
The argument is a map from card field names to values, for example @new_card([name: "My Card"])@ creates a card with the name @"My Card"@, and all other fields at their default value.
|
||||
|
||||
The map can also contain the following built-in keys: notes, id, linked_card_1 to linked_card_4, linked_relation_1 to linked_relation_4, stylesheet, styling_data, and extra_data. For styling_data and extra_data, the value must itself be a map from field names to values. Be sure to define a stylesheet before these.
|
||||
|
||||
NOTE: you should use underscores instead of spaces in field names.
|
||||
|
||||
The map can also contain the following built-in keys: notes, id, linked_card_1 to linked_card_4, linked_relation_1 to linked_relation_4, stylesheet, styling_data, and extra_data. For styling_data and extra_data, the value must itself be a map from field names to values. Be sure to define a stylesheet before these.
|
||||
|
||||
NOTE: you should use underscores instead of spaces in field names.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
@@ -26,7 +26,7 @@ NOTE: you should use underscores instead of spaces in field names.
|
||||
> ])
|
||||
>
|
||||
> # Write an image of the card to a file
|
||||
> write_image_file(my_card, file: "my_card.png")
|
||||
> write_image_file(my_card, file: "my_card.png")
|
||||
|
||||
> # Add the card to the current set
|
||||
> add_card_to_set(my_card)
|
||||
|
||||
@@ -14,7 +14,7 @@ This function can only be used in an [[type:export template]], when <tt>create d
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:image]] or [[type:card]] Image or Card to write to the file.
|
||||
| @file@ [[type:string]] Name of the file to write to.
|
||||
| @file@ [[type:string]] Name of the file to write to.
|
||||
| @width@ [[type:int]] Width in pixels to use for the image, by default the size of the image is used if available.
|
||||
| @height@ [[type:int]] Height in pixels to use for the image, by default the size of the image is used if available.
|
||||
| @zoom@ [[type:double]] Zoom percentage to apply to the card render.
|
||||
|
||||
Reference in New Issue
Block a user