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:
14
data/magic-modules.mse-include/names/card_fields
Normal file
14
data/magic-modules.mse-include/names/card_fields
Normal file
@@ -0,0 +1,14 @@
|
||||
card style:
|
||||
name:
|
||||
left: { name_left_1() + name_transform_symbol_shift_1() + name_card_symbol_shift_1() + nameline_offset_left_1() }
|
||||
top: { name_top_1() + nameline_offset_top_1() + name_font_vertical() }
|
||||
right: { name_right_1() + nameline_offset_width_1() }
|
||||
height: { name_height_1() + nameline_offset_height_1() }
|
||||
alignment: middle left shrink-overflow
|
||||
visible: { (not nameline_disabled_1()) and not name_disabled_1() }
|
||||
font:
|
||||
name: { name_font() }
|
||||
italic name: { name_font_italic() }
|
||||
size: { name_font_size() }
|
||||
color: { name_font_color() }
|
||||
z index: 900
|
||||
15
data/magic-modules.mse-include/names/card_fields_dfc
Normal file
15
data/magic-modules.mse-include/names/card_fields_dfc
Normal file
@@ -0,0 +1,15 @@
|
||||
include file: /magic-modules.mse-include/names/card_fields
|
||||
card style:
|
||||
name 2:
|
||||
left: { name_left_2() + name_transform_symbol_shift_2() + name_card_symbol_shift_2() + nameline_offset_left_2() }
|
||||
top: { name_top_2() + nameline_offset_top_2() + name2_font_vertical() }
|
||||
right: { name_right_2() + nameline_offset_width_2() }
|
||||
height: { name_height_2() + nameline_offset_height_2() }
|
||||
alignment: middle left shrink-overflow
|
||||
visible: { (not nameline_disabled_2()) and not name_disabled_2() }
|
||||
font:
|
||||
name: { name2_font() }
|
||||
italic name: { name2_font_italic() }
|
||||
size: { name2_font_size() }
|
||||
color: { name2_font_color() }
|
||||
z index: 900
|
||||
15
data/magic-modules.mse-include/names/card_fields_tfc
Normal file
15
data/magic-modules.mse-include/names/card_fields_tfc
Normal file
@@ -0,0 +1,15 @@
|
||||
include file: /magic-modules.mse-include/names/card_fields_dfc
|
||||
card style:
|
||||
name 3:
|
||||
left: { name_left_3() + name_transform_symbol_shift_3() + name_card_symbol_shift_3() + nameline_offset_left_3() }
|
||||
top: { name_top_3() + nameline_offset_top_3() + name3_font_vertical() }
|
||||
right: { name_right_3() + nameline_offset_width_3() }
|
||||
height: { name_height_3() + nameline_offset_height_3() }
|
||||
alignment: middle left shrink-overflow
|
||||
visible: { (not nameline_disabled_3()) and not name_disabled_3() }
|
||||
font:
|
||||
name: { name3_font() }
|
||||
italic name: { name3_font_italic() }
|
||||
size: { name3_font_size() }
|
||||
color: { name3_font_color() }
|
||||
z index: 900
|
||||
46
data/magic-modules.mse-include/names/readme.txt
Normal file
46
data/magic-modules.mse-include/names/readme.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
#### Consider using the Namelines 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/names/card_fields
|
||||
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
|
||||
include file: /magic-modules.mse-include/names/card_fields_dfc
|
||||
include file: /magic-modules.mse-include/names/card_fields_tfc
|
||||
|
||||
#### Default Field Placement (@375x523, w=1 h=1)
|
||||
name:
|
||||
left: 32w + symbols_width
|
||||
top: 27h
|
||||
right: 341w - casting_cost
|
||||
height: 26h
|
||||
#### Customization
|
||||
#### Optionally, you can define which face of the card the name should snap to,
|
||||
#### by defining the following function in the init script:
|
||||
nameline_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 name by:
|
||||
|
||||
#### To shift the name up/down:
|
||||
name_offset_top_1 := { 0 }
|
||||
|
||||
#### To shift the name left/right:
|
||||
name_offset_left_1 := { 0 }
|
||||
|
||||
#### To shift where the name ends:
|
||||
name_offset_right_1 := { 0 }
|
||||
|
||||
#### To increase/decrease the height of the name:
|
||||
name_offset_height_1 := { 0 }
|
||||
|
||||
#### For DFC or TFC templates, use:
|
||||
name_offset_top_2 := { 0 }
|
||||
name_offset_left_2 := { 0 }
|
||||
name_offset_size_2 := { 0 }
|
||||
name_offset_top_3 := { 0 }
|
||||
name_offset_left_3 := { 0 }
|
||||
name_offset_size_3 := { 0 }
|
||||
Reference in New Issue
Block a user