card_fields rewrite and magic-modules.mse-include (#21)

Overhauls the card_fields file to allow for template designers more freedom in manipulating data.

Adds magic-modules.mse-include, a large scale include file for building templates in a standardized way. Applying this to existing frames will be coming in future updates.
This commit is contained in:
GenevensiS
2024-05-25 00:57:47 +02:00
committed by GitHub
parent 44b059e2f7
commit fd4b8e4c89
1195 changed files with 13325 additions and 3633 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,10 @@
card style:
indicator:
left: { indicator_left_1() + typeline_offset_left_1() }
top: { indicator_top_1() + typeline_offset_top_1() }
width: { indicator_size_1() + typeline_offset_height_1() }
height: { indicator_size_1() + typeline_offset_height_1() }
z index: 800
render style: image
visible: { (not typeline_disabled_1()) and (not indicator_disabled_1()) and has_identity() }
image: { card_identity(card.indicator) }

View File

@@ -0,0 +1,11 @@
include file: card_fields
card style:
indicator 2:
left: { indicator_left_2() + typeline_offset_left_2() }
top: { indicator_top_2() + typeline_offset_top_2() }
width: { indicator_size_2() + typeline_offset_height_2() }
height: { indicator_size_2() + typeline_offset_height_2() }
z index: 800
render style: image
visible: { (not typeline_disabled_2()) and (not indicator_disabled_2()) and has_identity_2() }
image: { card_identity(card.indicator_2) }

View File

@@ -0,0 +1,11 @@
include file: card_fields_dfc
card style:
indicator 3:
left: { indicator_left_3() + typeline_offset_left_3() }
top: { indicator_top_3() + typeline_offset_top_3() }
width: { indicator_size_3() + typeline_offset_height_3() }
height: { indicator_size_3() + typeline_offset_height_3() }
z index: 800
render style: image
visible: { (not typeline_disabled_3()) and not indicator_disabled_3() and has_identity_3() }
image: { card_identity(card.indicator_3) }

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,43 @@
#### Consider using the Typelines module instead of this one.
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/indicators/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/indicators/card_fields_dfc
include file: /magic-modules.mse-include/indicators/card_fields_tfc
#### Default Field Placement (@375x523, w=1 h=1)
indicator:
left: 31w
top: 301h
width: 17w
height: 17h
#### Customization
#### Optionally, you can define which face of the card the color indicator should snap to,
#### by defining the following function in the init script:
typeline_face_1 := { 1 }
#### You can also adjust global alignment by defining the following functions, again in the init script,
#### which must return an int corresponding to the number of pixels you want to shift the color indicator by:
#### To shift the color indicator up/down:
indicator_offset_top_1 := { 0 }
#### To shift the color indicator left/right:
indicator_offset_left_1 := { 0 }
#### To increase/decrease the width and height of the color indicator:
indicator_offset_size_1 := { 0 }
#### For DFC or TFC templates, use:
indicator_offset_top_2 := { 0 }
indicator_offset_left_2 := { 0 }
indicator_offset_size_2 := { 0 }
indicator_offset_top_3 := { 0 }
indicator_offset_left_3 := { 0 }
indicator_offset_size_3 := { 0 }

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB