mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
updated documentation of the 'style' data type
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@785 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
+35
-12
@@ -29,16 +29,41 @@ Implies the @width@ is 20.
|
|||||||
The same holds for the vertical location and size; @top@, @height@ and @bottom@.
|
The same holds for the vertical location and size; @top@, @height@ and @bottom@.
|
||||||
|
|
||||||
--Rotation--
|
--Rotation--
|
||||||
Some types of styles allow an @angle@ to be specified.
|
Rotating a box can be done with the @angle@ property.
|
||||||
The angle gives a counter clockwise rotation in degrees of the ''contents'' of the box.
|
The angle gives a counter clockwise rotation in degrees of the box.
|
||||||
|
The box is rotated such that the corner for which the position is specified is at the correct position after rotating.
|
||||||
|
|
||||||
|
Here are some examples:
|
||||||
|
|
||||||
|
|<img src="style-angle-examples.png" alt=""/>
|
||||||
|
>red box:
|
||||||
|
> width: 30
|
||||||
|
> height: 25
|
||||||
|
> left: 10
|
||||||
|
> top: 20
|
||||||
|
> angle: 30
|
||||||
|
|
||||||
|
>green box:
|
||||||
|
> width: 25
|
||||||
|
> height: 30
|
||||||
|
> left: 10
|
||||||
|
> top: 80
|
||||||
|
> angle: 90
|
||||||
|
|
||||||
|
>blue box:
|
||||||
|
> width: 30
|
||||||
|
> height: 25
|
||||||
|
> right: 90
|
||||||
|
> bottom: 30
|
||||||
|
> angle: 30
|
||||||
|
|
||||||
|
>yellow box:
|
||||||
|
> width: 20
|
||||||
|
> height: 35
|
||||||
|
> right: 60
|
||||||
|
> bottom: 60
|
||||||
|
> angle: 180
|
||||||
|
|
||||||
For example, a text field with style:
|
|
||||||
>example:
|
|
||||||
> width: 60
|
|
||||||
> height: 40
|
|
||||||
> alignment: top left
|
|
||||||
Would, with different angles, look like:<br/>
|
|
||||||
<img src="style-angle.png" alt=""/>
|
|
||||||
|
|
||||||
--Properties--
|
--Properties--
|
||||||
! Property Type Default Description
|
! Property Type Default Description
|
||||||
@@ -49,6 +74,7 @@ Would, with different angles, look like:<br/>
|
|||||||
| @top@ [[type:scriptable]] [[type:double]] ''Required'' Distance between top edge of the box and the top of the card in pixels.
|
| @top@ [[type:scriptable]] [[type:double]] ''Required'' Distance between top edge of the box and the top of the card in pixels.
|
||||||
| @height@ [[type:scriptable]] [[type:double]] ''Required'' Height of the box in pixels.
|
| @height@ [[type:scriptable]] [[type:double]] ''Required'' Height of the box in pixels.
|
||||||
| @bottom@ [[type:scriptable]] [[type:double]] ''Required'' Distance between bottom edge of the box and the ''top'' of the card in pixels.
|
| @bottom@ [[type:scriptable]] [[type:double]] ''Required'' Distance between bottom edge of the box and the ''top'' of the card in pixels.
|
||||||
|
| @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of this box, in degrees counter clockwise.
|
||||||
| @visible@ [[type:scriptable]] [[type:boolean]] @true@ Is this field visible at all?
|
| @visible@ [[type:scriptable]] [[type:boolean]] @true@ Is this field visible at all?
|
||||||
|
|
||||||
The rest of the properties depend on the type of [[type:field]] this style is for.
|
The rest of the properties depend on the type of [[type:field]] this style is for.
|
||||||
@@ -59,7 +85,6 @@ The rest of the properties depend on the type of [[type:field]] this style is fo
|
|||||||
Text that is not supported by the symbol font is still rendered as normal text.
|
Text that is not supported by the symbol font is still rendered as normal text.
|
||||||
| ^^^ @allow formating@ [[type:boolean]] @true@ Is custom formating (bold, italic) allowed?
|
| ^^^ @allow formating@ [[type:boolean]] @true@ Is custom formating (bold, italic) allowed?
|
||||||
| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text.
|
| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text.
|
||||||
| ^^^ @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of the text inside the box, in degrees.
|
|
||||||
| ^^^ @direction@ [[type:direction]] @"left to right"@ Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character.
|
| ^^^ @direction@ [[type:direction]] @"left to right"@ Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character.
|
||||||
| ^^^ @padding left@ [[type:double]] @0@ Padding between the text and the border of the box, in pixels.
|
| ^^^ @padding left@ [[type:double]] @0@ Padding between the text and the border of the box, in pixels.
|
||||||
| ^^^ @padding right@ ^^^ ^^^ ^^^
|
| ^^^ @padding right@ ^^^ ^^^ ^^^
|
||||||
@@ -94,7 +119,6 @@ The rest of the properties depend on the type of [[type:field]] this style is fo
|
|||||||
| ^^^ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
| ^^^ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
||||||
| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the image with the background? Can be overriden using the [[fun:set_combine]] function.
|
| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the image with the background? Can be overriden using the [[fun:set_combine]] function.
|
||||||
| ^^^ @alignment@ [[type:alignment]] @"stretch"@ Alignment of text and images in the box.
|
| ^^^ @alignment@ [[type:alignment]] @"stretch"@ Alignment of text and images in the box.
|
||||||
| ^^^ @angle@ [[type:int]] @0@ Rotation of the text and images inside the box, in degrees.
|
|
||||||
| ^^^ @font@ [[type:font]] Font to use for rendering text (depending on @render style@)
|
| ^^^ @font@ [[type:font]] Font to use for rendering text (depending on @render style@)
|
||||||
| ^^^ @image@ [[type:image|scriptable image]] Image to show (depending on @render style@).<br/>
|
| ^^^ @image@ [[type:image|scriptable image]] Image to show (depending on @render style@).<br/>
|
||||||
The script will be called with @input@ set to the value to determine an image for.
|
The script will be called with @input@ set to the value to determine an image for.
|
||||||
@@ -117,7 +141,6 @@ The rest of the properties depend on the type of [[type:field]] this style is fo
|
|||||||
|
|
||||||
! <<< <<< <<< <<<
|
! <<< <<< <<< <<<
|
||||||
| @"image"@ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
| @"image"@ @mask@ [[type:scriptable]] [[type:filename]] ''none'' A mask to apply to the image, black areas in the mask become transparent, similair to [[fun:set_mask]].
|
||||||
| ^^^ @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of the image inside the box, in degrees.
|
|
||||||
| ^^^ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none.
|
| ^^^ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none.
|
||||||
|
|
||||||
! <<< <<< <<< <<<
|
! <<< <<< <<< <<<
|
||||||
|
|||||||
Reference in New Issue
Block a user