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

View File

@@ -0,0 +1,9 @@
card style:
separator:
left: { flavor_bar_left(1) + flavor_bar_offset_left_1() - flavor_bar_offset_width_1() }
top: { flavor_bar_top(1) + flavor_bar_offset_top_1() - flavor_bar_offset_height_1() }
width: { flavor_bar_width(1) + 2*flavor_bar_offset_width_1() }
height: { flavor_bar_height(1) + 2*flavor_bar_offset_height_1() }
render style: image
image: { "/magic-modules.mse-include/separators/" + card.separator + ".png" }
z index: 740

View File

@@ -0,0 +1,10 @@
include file: /magic-modules.mse-include/separators/card_fields
card style:
separator 2:
left: { flavor_bar_left(2) + flavor_bar_offset_left_2() - flavor_bar_offset_width_2() }
top: { flavor_bar_top(2) + flavor_bar_offset_top_2() - flavor_bar_offset_height_2() }
width: { flavor_bar_width(2) + 2*flavor_bar_offset_width_2() }
height: { flavor_bar_height(2) + 2*flavor_bar_offset_height_2() }
render style: image
image: { "/magic-modules.mse-include/separators/" + card.separator_2 + ".png" }
z index: 740

View File

@@ -0,0 +1,10 @@
include file: /magic-modules.mse-include/separators/card_fields_dfc
card style:
separator 3:
left: { flavor_bar_left(3) + flavor_bar_offset_left_3() - flavor_bar_offset_width_3() }
top: { flavor_bar_top(3) + flavor_bar_offset_top_3() - flavor_bar_offset_height_3() }
width: { flavor_bar_width(3) + 2*flavor_bar_offset_width_3() }
height: { flavor_bar_height(3) + 2*flavor_bar_offset_height_3() }
render style: image
image: { "/magic-modules.mse-include/separators/" + card.separator_3 + ".png" }
z index: 740

View File

@@ -0,0 +1,9 @@
choice: flavor bar
choice: grey bar
choice:
name: level
enabled: { separator_enable_level() }
choice:
name: level notchless
enabled: { separator_enable_level() }
choice: none

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,34 @@
#### 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/separators/card_fields
#### For DFC, TFC, or multiple textbox templates, instead use:
include file: /magic-modules.mse-include/separators/card_fields_dfc
include file: /magic-modules.mse-include/separators/card_fields_tfc
#### Customization
#### Optionally, you can adjust global alignment by defining the following functions in the init script,
#### which must return an int corresponding to the number of pixels you want to shift the flavor bar by:
#### To shift the bar up/down:
flavor_bar_offset_top_1 := { 0 }
#### To shift the bar left/right:
flavor_bar_offset_left_1 := { 0 }
#### To increase/decrease the size:
flavor_bar_offset_width_1 := { 0 }
flavor_bar_offset_height_1 := { 0 }
#### For the other faces on DFC or TFC templates, use:
flavor_bar_offset_top_2 := { 0 }
flavor_bar_offset_left_2 := { 0 }
flavor_bar_offset_width_2 := { 0 }
flavor_bar_offset_height_2 := { 0 }
flavor_bar_offset_top_3 := { 0 }
flavor_bar_offset_left_3 := { 0 }
flavor_bar_offset_width_3 := { 0 }
flavor_bar_offset_height_3 := { 0 }