Commit e7819c56 authored by twanvl's avatar twanvl

added guild mana support for all magic styles;

uses correct script context for cards using a stylesheet other then the default one.
parent 6eb576cf
...@@ -26,7 +26,13 @@ init script: ...@@ -26,7 +26,13 @@ init script:
land_template := { "acard.jpg" } land_template := { "acard.jpg" }
# Use the normal tap symbol # Use the normal tap symbol
mana_t := { "new" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Does the card have a color that requires a white font for copyright/artist?
white_font_colors := filter_rule(match:"^(hybrid )?black|^land") white_font_colors := filter_rule(match:"^(hybrid )?black|^land")
...@@ -55,12 +61,30 @@ styling field: ...@@ -55,12 +61,30 @@ styling field:
name: popup mana symbols name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well description: Use the symbols of the casting cost line inside the text box as well
initial: no initial: no
styling field:
type: choice
name: tap symbol
description: What tap symbol should be used on cards?
initial: modern
choice: modern
choice: old
choice: diagonal T
styling style: styling style:
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols: popup mana symbols:
choice images: choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both
choice images:
modern: /magic-mana-large.mse-symbol-font/mana_t.png
old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
......
...@@ -27,7 +27,13 @@ init script: ...@@ -27,7 +27,13 @@ init script:
pt_template := { "/magic-new.mse-style/" + artifact_template() + "pt.jpg" } pt_template := { "/magic-new.mse-style/" + artifact_template() + "pt.jpg" }
# Use the normal tap symbol # Use the normal tap symbol
mana_t := { "mana_t.png" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Does the card have a color that requires a white font for copyright/artist?
white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land") white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land")
...@@ -63,12 +69,30 @@ styling field: ...@@ -63,12 +69,30 @@ styling field:
name: popup mana symbols name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well description: Use the symbols of the casting cost line inside the text box as well
initial: no initial: no
styling field:
type: choice
name: tap symbol
description: What tap symbol should be used on cards?
initial: modern
choice: modern
choice: old
choice: diagonal T
styling style: styling style:
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols: popup mana symbols:
choice images: choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both
choice images:
modern: /magic-mana-large.mse-symbol-font/mana_t.png
old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
......
...@@ -19,7 +19,13 @@ init script: ...@@ -19,7 +19,13 @@ init script:
} }
# Use the normal tap symbol # Use the normal tap symbol
mana_t := { "mana_t.png" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Does the card have a color that requires a white font for copyright/artist?
white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land") white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land")
...@@ -31,81 +37,50 @@ init script: ...@@ -31,81 +37,50 @@ init script:
} }
############################################################## Set info fields ############################################################## Extra style options
info style:
title:
padding left: 2
font:
size: 16
symbol:
variation:
name: common
border radius: 0.10
fill type: solid
fill color: rgb(0,0,0)
border color: rgb(255,255,255)
variation:
name: uncommon
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(224,224,224)
fill color 2: rgb(84, 84, 84)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: rare
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(214,196,94)
fill color 2: rgb(95, 84, 40)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: special
border radius: 0.10
fill type: linear gradient
fill color 1: rgb(224,170,247)
fill color 2: rgb(58,7,80)
border color 1: rgb(255,255,255)
border color 2: rgb(255,255,255)
automatic reminder text:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
use gradient multicolor:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
styling field:
############################################################## Extra style
extra field:
type: boolean type: boolean
name: colored mana symbols name: colored mana symbols
description: Use colored mana symbols, as used by Wizards since Fifth Dawn. description: Use colored mana symbols, as used by Wizards since Fifth Dawn.
extra field: styling field:
type: boolean type: boolean
name: darker artifacts name: darker artifacts
description: Use darker artifacts, as used by Wizards since Fifth Dawn. description: Use darker artifacts, as used by Wizards since Fifth Dawn.
extra field: styling field:
type: boolean type: boolean
name: use guild mana symbols name: use guild mana symbols
description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana. description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
initial: no initial: no
extra field: styling field:
type: boolean type: boolean
name: popup mana symbols name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well description: Use the symbols of the casting cost line inside the text box as well
initial: no initial: no
styling field:
extra style: type: choice
name: tap symbol
description: What tap symbol should be used on cards?
initial: modern
choice: modern
choice: old
choice: diagonal T
styling style:
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols: popup mana symbols:
choice images: choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both
choice images:
modern: /magic-mana-large.mse-symbol-font/mana_t.png
old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
......
...@@ -34,6 +34,8 @@ init script: ...@@ -34,6 +34,8 @@ init script:
else if styling.tap_symbol == "diagonal T" then "older" else if styling.tap_symbol == "diagonal T" then "older"
else "new" else "new"
} }
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Does the card have a color that requires a white font for copyright/artist?
white_font_colors := filter_rule(match:"^(hybrid 2 color )?(hybrid 3 color [^/]*/[^/]*/ )?(hybrid vertical [^/]*/ )?(black|land|hybrid 4 color w/u/b/r)") white_font_colors := filter_rule(match:"^(hybrid 2 color )?(hybrid 3 color [^/]*/[^/]*/ )?(hybrid vertical [^/]*/ )?(black|land|hybrid 4 color w/u/b/r)")
...@@ -90,6 +92,10 @@ styling style: ...@@ -90,6 +92,10 @@ styling style:
light: oacard.jpg light: oacard.jpg
dark: acard.jpg dark: acard.jpg
brown: bacard.jpg brown: bacard.jpg
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols: popup mana symbols:
choice images: choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png yes: /magic-mana-large.mse-symbol-font/mana_w.png
......
...@@ -23,8 +23,14 @@ init script: ...@@ -23,8 +23,14 @@ init script:
# Horizontal 5 color blends are not supported # Horizontal 5 color blends are not supported
card_hybrid_5b := card_hybrid_5 card_hybrid_5b := card_hybrid_5
# Use the old tap symbol # Use the normal tap symbol
mana_t := { "old" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a black font for copyright/artist? # Does the card have a color that requires a black font for copyright/artist?
black_font_colors := filter_rule(match:"^(hybrid 2 color)?white") black_font_colors := filter_rule(match:"^(hybrid 2 color)?white")
...@@ -35,56 +41,42 @@ init script: ...@@ -35,56 +41,42 @@ init script:
rgb(255,255,255) rgb(255,255,255)
} }
############################################################## Set info fields ############################################################## Extra style options
info style:
title: styling field:
padding left: 2 type: boolean
font: name: use guild mana symbols
size: 16 description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
symbol: initial: no
variation: styling field:
name: common type: boolean
border radius: 0.10 name: popup mana symbols
fill type: solid description: Use the symbols of the casting cost line inside the text box as well
fill color: rgb(0,0,0) initial: no
border color: rgb(255,255,255) styling field:
variation: type: choice
name: uncommon name: tap symbol
border radius: 0.05 description: What tap symbol should be used on cards?
fill type: linear gradient initial: old
fill color 1: rgb(224,224,224) choice: modern
fill color 2: rgb(84, 84, 84) choice: old
border color 1: rgb(0, 0, 0) choice: diagonal T
border color 2: rgb(0, 0, 0)
variation: styling style:
name: rare use guild mana symbols:
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(214,196,94)
fill color 2: rgb(95, 84, 40)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: special
border radius: 0.10
fill type: linear gradient
fill color 1: rgb(224,170,247)
fill color 2: rgb(58,7,80)
border color 1: rgb(255,255,255)
border color 2: rgb(255,255,255)
automatic reminder text:
render style: both
choice images: choice images:
yes: script: buildin_image("bool_yes") yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: script: buildin_image("bool_no") no: /magic-mana-small.mse-symbol-font/mana_rg.png
use gradient multicolor: popup mana symbols:
choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both render style: both
choice images: choice images:
yes: script: buildin_image("bool_yes") modern: /magic-mana-large.mse-symbol-font/mana_t.png
no: script: buildin_image("bool_no") old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Extra style
############################################################## Card fields ############################################################## Card fields
card style: card style:
...@@ -181,7 +173,11 @@ card style: ...@@ -181,7 +173,11 @@ card style:
scale down to: 6 scale down to: 6
color: rgb(0,0,0) color: rgb(0,0,0)
symbol font: symbol font:
name: magic-mana-small name:
script:
if styling.popup_mana_symbols
then "magic-mana-large"
else "magic-mana-small"
size: 13 size: 13
align: middle center align: middle center
z index: 2 z index: 2
......
...@@ -23,8 +23,14 @@ init script: ...@@ -23,8 +23,14 @@ init script:
# Horizontal 5 color blends are not supported # Horizontal 5 color blends are not supported
card_hybrid_5b := card_hybrid_5 card_hybrid_5b := card_hybrid_5
# Use the old tap symbol # Use the normal tap symbol
mana_t := { "old" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a black font for copyright/artist? # Does the card have a color that requires a black font for copyright/artist?
black_font_colors := filter_rule(match:"^(hybrid 2 color)?white") black_font_colors := filter_rule(match:"^(hybrid 2 color)?white")
...@@ -35,57 +41,43 @@ init script: ...@@ -35,57 +41,43 @@ init script:
rgb(255,255,255) rgb(255,255,255)
} }
############################################################## Set info fields
info style:
title:
padding left: 2
font:
size: 16
symbol:
variation:
name: common
border radius: 0.10
fill type: solid
fill color: rgb(0,0,0)
border color: rgb(255,255,255)
variation:
name: uncommon
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(224,224,224)
fill color 2: rgb(84, 84, 84)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: rare
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(214,196,94)
fill color 2: rgb(95, 84, 40)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: special
border radius: 0.10
fill type: linear gradient
fill color 1: rgb(224,170,247)
fill color 2: rgb(58,7,80)
border color 1: rgb(255,255,255)
border color 2: rgb(255,255,255)
automatic reminder text:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
use gradient multicolor:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
############################################################## Extra style options
styling field:
type: boolean
name: use guild mana symbols
description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
initial: no
styling field:
type: boolean
name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well
initial: no
styling field:
type: choice
name: tap symbol
description: What tap symbol should be used on cards?
initial: old
choice: modern
choice: old
choice: diagonal T
############################################################## Extra style styling style:
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols:
choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both
choice images:
modern: /magic-mana-large.mse-symbol-font/mana_t.png
old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
...@@ -203,7 +195,11 @@ card style: ...@@ -203,7 +195,11 @@ card style:
scale down to: 6 scale down to: 6
color: rgb(0,0,0) color: rgb(0,0,0)
symbol font: symbol font:
name: magic-mana-small name:
script:
if styling.popup_mana_symbols
then "magic-mana-large"
else "magic-mana-small"
size: 13 size: 13
align: middle left align: middle left
z index: 2 z index: 2
......
...@@ -25,7 +25,13 @@ init script: ...@@ -25,7 +25,13 @@ init script:
pt_template := { input + "pt.jpg" } pt_template := { input + "pt.jpg" }
# Use the normal tap symbol # Use the normal tap symbol
mana_t := { "new" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Does the card have a color that requires a white font for copyright/artist?
white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land") white_font_colors := filter_rule(match:"^(hybrid 2 color)?black|^land")
...@@ -36,86 +42,28 @@ init script: ...@@ -36,86 +42,28 @@ init script:
rgb(0,0,0) rgb(0,0,0)
} }
############################################################## Set info fields ############################################################## Extra style options
info style:
title:
padding left: 2
font:
size: 16
symbol:
variation:
name: common
border radius: 0.10
fill type: solid
fill color: rgb(0,0,0)
border color: rgb(255,255,255)
variation:
name: uncommon
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(224,224,224)
fill color 2: rgb(84, 84, 84)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: rare
border radius: 0.05
fill type: linear gradient
fill color 1: rgb(214,196,94)
fill color 2: rgb(95, 84, 40)
border color 1: rgb(0, 0, 0)
border color 2: rgb(0, 0, 0)
variation:
name: special
border radius: 0.10
fill type: linear gradient
fill color 1: rgb(224,170,247)
fill color 2: rgb(58,7,80)
border color 1: rgb(255,255,255)
border color 2: rgb(255,255,255)
automatic reminder text:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
use gradient multicolor:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
############################################################## Extra style styling field:
extra field:
type: boolean
name: colored mana symbols
description: Use colored mana symbols, as used by Wizards since Fifth Dawn.
extra field:
type: boolean type: boolean
name: darker artifacts name: darker artifacts
description: Use darker artifacts, as used by Wizards since Fifth Dawn. description: Use darker artifacts, as used by Wizards since Fifth Dawn.
extra field: styling field:
type: boolean type: boolean
name: grey hybrid name name: grey hybrid name
description: Use a grey background for the name and type line on hybrid cards. This is done on real cards. description: Use a grey background for the name and type line on hybrid cards. This is done on real cards.
initial: no initial: no
extra field: styling field:
type: boolean type: boolean
name: use guild mana symbols name: use guild mana symbols
description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana. description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
initial: no initial: no
extra field:
type: boolean
name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well
initial: no
extra style: styling style:
popup mana symbols: use guild mana symbols:
choice images: choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_w.png no: /magic-mana-small.mse-symbol-font/mana_rg.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
......
...@@ -271,22 +271,19 @@ set field: ...@@ -271,22 +271,19 @@ set field:
name: gold name: gold
color: rgb(200,180,0) color: rgb(200,180,0)
set field: set field:
type: choice
name: automatic reminder text
choice: yes
choice: only for custom keywords
choice: no
description: Should reminder text be added to keywords by default? Note: you can enable/disable reminder text by right clicking the keyword.
set field:
# TODO : RENAME
type: multiple choice type: multiple choice
name: automatic reminder text2 name: automatic reminder text
choice: old choice: old
choice: core choice: core
choice: expert choice: expert
choice: custom choice: custom
initial: old, core, export, custom initial: old, core, expert, custom
description: Should reminder text be added to keywords by default? Note: you can enable/disable reminder text by right clicking the keyword. # Convert from older mse versions
script:
if value = "yes" then "old, core, expert, custom"
else if value = "no" then ""
else value
description: For which kinds of keywords should reminder text be added by default? Note: you can enable/disable reminder text by right clicking the keyword.
set field: set field:
type: boolean type: boolean
name: automatic card numbers name: automatic card numbers
...@@ -343,11 +340,6 @@ default set style: ...@@ -343,11 +340,6 @@ default set style:
border color 1: rgb(255,255,255) border color 1: rgb(255,255,255)
border color 2: rgb(255,255,255) border color 2: rgb(255,255,255)
automatic reminder text: automatic reminder text:
render style: both
choice images:
yes: script: buildin_image("bool_yes")
no: script: buildin_image("bool_no")
automatic reminder text2:
render style: checklist render style: checklist
direction: vertical direction: vertical
use gradient multicolor: use gradient multicolor:
...@@ -891,7 +883,7 @@ statistics category: ...@@ -891,7 +883,7 @@ statistics category:
has keywords: true has keywords: true
keyword preview: {keyword} <i>({reminder})</i> #keyword preview: {keyword} <i>({reminder})</i>
keyword mode: keyword mode:
name: old name: old
...@@ -970,12 +962,12 @@ keyword: ...@@ -970,12 +962,12 @@ keyword:
reminder: This creature deals combat damage before creatures without first strike. reminder: This creature deals combat damage before creatures without first strike.
keyword: keyword:
keyword: Enchant keyword: Enchant
match: Enchant <param>name</param> match: Enchant <atom-param>name</atom-param>
mode: core mode: core
reminder: Target a <param> as you play this. This card comes into play attached to that {param1}. reminder: Target a {param1} as you play this. This card comes into play attached to that {param1}.
keyword: keyword:
keyword: Cycling keyword: Cycling
match: Cycling <param>cost</param> match: Cycling <atom-param>cost</atom-param>
mode: core mode: core
reminder: {param1}, Discard this card: Draw a card. reminder: {param1}, Discard this card: Draw a card.
keyword: keyword:
...@@ -988,7 +980,7 @@ keyword: ...@@ -988,7 +980,7 @@ keyword:
reminder: When declaring attackers or blockers this creature may group with others creatures with banding and one creature without banding. When damage is dealt, you decide where damage is dealt. reminder: When declaring attackers or blockers this creature may group with others creatures with banding and one creature without banding. When damage is dealt, you decide where damage is dealt.
keyword: keyword:
keyword: Rampage keyword: Rampage
match: Rampage <param>number</param> match: Rampage <atom-param>number</atom-param>
mode: old mode: old
reminder: Whenever this creature becomes blocked, it gets +{param1}/+{param1} until end of turn for each creature blocking it beyond the first. reminder: Whenever this creature becomes blocked, it gets +{param1}/+{param1} until end of turn for each creature blocking it beyond the first.
keyword: keyword:
...@@ -1001,7 +993,7 @@ keyword: ...@@ -1001,7 +993,7 @@ keyword:
reminder: This creature can’t attack. reminder: This creature can’t attack.
keyword: keyword:
keyword: Cumulative upkeep keyword: Cumulative upkeep
match: Cumulative upkeep <param>cost</param> match: Cumulative upkeep <atom-param>cost</atom-param>
mode: old mode: old
reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay {param1} for each age counter on it. reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay {param1} for each age counter on it.
keyword: keyword:
...@@ -1014,7 +1006,7 @@ keyword: ...@@ -1014,7 +1006,7 @@ keyword:
reminder: At the beginning of your upkeep, put this and any cards attached to it in the phased-out zone. If this is already in the phased-out zone, return it and any card attached to it to play. If there were counters on this card when it phased out, put that many counters on it when it returns to play. This ability does not cause comes-into-play or leaves play abilities to trigger. reminder: At the beginning of your upkeep, put this and any cards attached to it in the phased-out zone. If this is already in the phased-out zone, return it and any card attached to it to play. If there were counters on this card when it phased out, put that many counters on it when it returns to play. This ability does not cause comes-into-play or leaves play abilities to trigger.
keyword: keyword:
keyword: Flanking keyword: Flanking
match: Flanking <param>number</param> match: Flanking <atom-param>number</atom-param>
mode: old mode: old
reminder: Whenever a creature without flanking blocks this creature, the blocking creature gets -{param1}/-{param1} until end of turn. reminder: Whenever a creature without flanking blocks this creature, the blocking creature gets -{param1}/-{param1} until end of turn.
keyword: keyword:
...@@ -1023,40 +1015,31 @@ keyword: ...@@ -1023,40 +1015,31 @@ keyword:
reminder: This creature can block or be blocked by only creatures with shadow. reminder: This creature can block or be blocked by only creatures with shadow.
keyword: keyword:
keyword: Buyback keyword: Buyback
match: Buyback <param>cost</param> match: Buyback <atom-param>cost</atom-param>
mode: expert mode: expert
reminder: You may pay {param1} in addition to any other costs as you play this spell. If you do, put ~ into your hand instead of your graveyard as part of its resolution. reminder: You may pay {param1} in addition to any other costs as you play this spell. If you do, put ~ into your hand instead of your graveyard as part of its resolution.
keyword: keyword:
keyword: Echo keyword: Echo
mode: expert mode: expert
reminder: At the beginning of your next upkeep after this permanent comes under your control, sacrifice it unless you pay its mana cost. reminder: At the beginning of your next upkeep after this permanent comes under your control, sacrifice it unless you pay its mana cost.
keyword:
keyword: Plainscycling
separator: whitespace [ ]
parameter: cost
mode: expert
reminder: <param>, Discard this card: Search your library for a Plains card, reveal it, and put it into your hand. Then shuffle your library.
keyword: keyword:
keyword: Landcycling keyword: Landcycling
match: <param>prefix</param>cycling <param>cost</param> match: <atom-param>prefix</atom-param>cycling <atom-param>cost</atom-param>
mode: expert mode: expert
reminder: {param2}, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library. reminder: {param2}, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library.
keyword: keyword:
keyword: Fading keyword: Fading
separator: whitespace [ ] match: Fading <atom-param>number</atom-param>
parameter: number (a, two, ...)
mode: expert mode: expert
reminder: This comes into play with <param> fade counter(s) on it. At the beginning of your upkeep, remove a fade counter from it. If you can’t, sacrifice it. reminder: This comes into play with {param1} fade counter(s) on it. At the beginning of your upkeep, remove a fade counter from it. If you can’t, sacrifice it.
keyword: keyword:
keyword: Kicker keyword: Kicker
separator: whitespace [ ] match: Kicker <atom-param>cost</atom-param>
parameter: cost
mode: expert mode: expert
reminder: You may pay an additional <param> as you play this spell. reminder: You may pay an additional {param1} as you play this spell.
keyword: keyword:
keyword: Madness keyword: Madness
separator: whitespace [ ] match: Madness <atom-param>cost</atom-param>
parameter: cost
mode: expert mode: expert
reminder: You may play this card for its madness cost at the time you discard it. reminder: You may play this card for its madness cost at the time you discard it.
keyword: keyword:
...@@ -1082,7 +1065,7 @@ keyword: ...@@ -1082,7 +1065,7 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (a, two, ...) parameter: number (a, two, ...)
mode: expert mode: expert
reminder: As this card comes into play, put <param> +1/+1 counter(s) on it for each creature that shares a type with this that you reveal in your hand. reminder: As this card comes into play, put {param1} +1/+1 counter(s) on it for each creature that shares a type with this that you reveal in your hand.
keyword: keyword:
keyword: Double strike keyword: Double strike
mode: expert mode: expert
...@@ -1112,7 +1095,7 @@ keyword: ...@@ -1112,7 +1095,7 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: cost parameter: cost
mode: expert mode: expert
reminder: <param>: Attach to target creature you control. Equip only as a sorcery. This card comes into play unattached and stays in play if the creature leaves play. reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. This card comes into play unattached and stays in play if the creature leaves play.
keyword: keyword:
keyword: Imprint keyword: Imprint
separator: dash [ - ] separator: dash [ - ]
...@@ -1124,20 +1107,20 @@ keyword: ...@@ -1124,20 +1107,20 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (a, two, ...) parameter: number (a, two, ...)
mode: expert mode: expert
reminder: This comes into play with <param> +1/+1 counter(s) on it. When it’s put into a graveyard, you may put its +1/+1 counters on target artifact creature. reminder: This comes into play with {param1} +1/+1 counter(s) on it. When it’s put into a graveyard, you may put its +1/+1 counters on target artifact creature.
keyword: keyword:
keyword: Scry keyword: Scry
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (, two, ...) parameter: number (, two, ...)
mode: expert mode: expert
reminder: Look at the top <param> card(s) of your library. Put any number of them on the bottom of your library in any order and the rest on top of your library in any order. reminder: Look at the top {param1} card(s) of your library. Put any number of them on the bottom of your library in any order and the rest on top of your library in any order.
keyword: keyword:
keyword: Sunburst keyword: Sunburst
mode: expert mode: expert
reminder: This comes into play with a +1/+1 counter on it for each color of mana used to pay its cost. If it is not a creature, use charge counters instead. reminder: This comes into play with a +1/+1 counter on it for each color of mana used to pay its cost. If it is not a creature, use charge counters instead.
#keyword: #keyword:
keyword: Splice keyword: Splice
match: Splice onto <param>name</param> <param>cost</param> match: Splice onto <atom-param>name</atom-param> <atom-param>cost</atom-param>
mode: expert mode: expert
reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell. reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell.
keyword: keyword:
...@@ -1151,25 +1134,25 @@ keyword: ...@@ -1151,25 +1134,25 @@ keyword:
separator: dash [ - ] separator: dash [ - ]
parameter: name parameter: name
mode: expert mode: expert
reminder: You may play this card any time you could play an instant by sacrificing a <param> and paying the difference in mana costs between this and the sacrificed <param>. Mana cost includes color. reminder: You may play this card any time you could play an instant by sacrificing a {param1} and paying the difference in mana costs between this and the sacrificed {param1}. Mana cost includes color.
keyword: keyword:
keyword: Bushido keyword: Bushido
separator: whitespace [ ] separator: whitespace [ ]
parameter: number parameter: number
mode: expert mode: expert
reminder: When this blocks or becomes blocked, it gets +<param>/+<param> until end of turn. reminder: When this blocks or becomes blocked, it gets +{param1}/+{param1} until end of turn.
keyword: keyword:
keyword: Ninjutsu keyword: Ninjutsu
separator: whitespace [ ] separator: whitespace [ ]
parameter: cost parameter: cost
mode: expert mode: expert
reminder: <param>, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking. reminder: {param1}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking.
keyword: keyword:
keyword: Soulshift keyword: Soulshift
separator: whitespace [ ] separator: whitespace [ ]
parameter: number parameter: number
mode: expert mode: expert
reminder: When this is put into a graveyard from play, you may return target Spirit card with converted mana cost <param> or less from you graveyard to your hand. reminder: When this is put into a graveyard from play, you may return target Spirit card with converted mana cost {param1} or less from you graveyard to your hand.
keyword: keyword:
keyword: Epic keyword: Epic
mode: expert mode: expert
...@@ -1183,7 +1166,7 @@ keyword: ...@@ -1183,7 +1166,7 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: cost parameter: cost
mode: expert mode: expert
reminder: <param>, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Play only as a sorcery. reminder: {param1}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Play only as a sorcery.
keyword: keyword:
keyword: Haunt keyword: Haunt
mode: expert mode: expert
...@@ -1193,7 +1176,7 @@ keyword: ...@@ -1193,7 +1176,7 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (a, two, ...) parameter: number (a, two, ...)
mode: expert mode: expert
reminder: If an opponent was dealt damage this turn, this creature comes into play with <param> +1/+1 counter(s) on it. reminder: If an opponent was dealt damage this turn, this creature comes into play with {param1} +1/+1 counter(s) on it.
keyword: keyword:
keyword: Replicate keyword: Replicate
separator: whitespace [ ] separator: whitespace [ ]
...@@ -1218,7 +1201,7 @@ keyword: ...@@ -1218,7 +1201,7 @@ keyword:
reminder: If defending player is wearing any clothing made of denim, this creature is unblockable. reminder: If defending player is wearing any clothing made of denim, this creature is unblockable.
keyword: keyword:
keyword: Landwalk keyword: Landwalk
match: <param>prefix</param>walk match: <atom-param>prefix</atom-param>walk
mode: core mode: core
reminder: This creature is unblockable as long as defending player controls a {param1}. reminder: This creature is unblockable as long as defending player controls a {param1}.
keyword: keyword:
...@@ -1226,19 +1209,19 @@ keyword: ...@@ -1226,19 +1209,19 @@ keyword:
separator: whitespace [ ] separator: whitespace [ ]
parameter: name parameter: name
mode: core mode: core
reminder: This creature can’t be blocked, targeted, dealt damage, or enchanted by anything <param>. reminder: This creature can’t be blocked, targeted, dealt damage, or enchanted by anything {param1}.
keyword: keyword:
keyword: Dredge keyword: Dredge
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (one, two, ...) parameter: number (one, two, ...)
mode: expert mode: expert
reminder: As long as you have at least <param> card(s) in your library, if you would draw a card, you may instead put exactly <param> card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand. reminder: As long as you have at least {param1} card(s) in your library, if you would draw a card, you may instead put exactly {param1} card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand.
keyword: keyword:
keyword: Graft keyword: Graft
separator: whitespace [ ] separator: whitespace [ ]
parameter: number (a, two, ...) parameter: number (a, two, ...)
mode: expert mode: expert
reminder: This creature comes into play with <param> +1/+1 counter(s) on it. Whenever another creature comes into play, you may move a +1/+1 counter from this creature onto it. reminder: This creature comes into play with {param1} +1/+1 counter(s) on it. Whenever another creature comes into play, you may move a +1/+1 counter from this creature onto it.
keyword: keyword:
keyword: Forecast keyword: Forecast
separator: whitespace [ ] separator: whitespace [ ]
......
...@@ -9,8 +9,14 @@ icon: card-sample.png ...@@ -9,8 +9,14 @@ icon: card-sample.png
############################################################## Extra scripts ############################################################## Extra scripts
init script: init script:
# Use the old tap symbol # Use the normal tap symbol
mana_t := { "old" } mana_t := {
if styling.tap_symbol == "old" then "old"
else if styling.tap_symbol == "diagonal T" then "older"
else "new"
}
# Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols }
############################################################## Set info fields ############################################################## Set info fields
info style: info style:
...@@ -19,13 +25,42 @@ info style: ...@@ -19,13 +25,42 @@ info style:
font: font:
size: 16 size: 16
############################################################## Extra style ############################################################## Extra style options
extra field: styling field:
type: boolean
name: use guild mana symbols
description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
initial: no
styling field:
type: boolean type: boolean
name: popup mana symbols name: popup mana symbols
description: Use the symbols of the casting cost line inside the text box as well description: Use the symbols of the casting cost line inside the text box as well
initial: no initial: no
styling field:
type: choice
name: tap symbol
description: What tap symbol should be used on cards?
initial: old
choice: modern
choice: old
choice: diagonal T
styling style:
use guild mana symbols:
choice images:
yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
no: /magic-mana-small.mse-symbol-font/mana_rg.png
popup mana symbols:
choice images:
yes: /magic-mana-large.mse-symbol-font/mana_w.png
no: /magic-mana-small.mse-symbol-font/mana_w.png
tap symbol:
render style: both
choice images:
modern: /magic-mana-large.mse-symbol-font/mana_t.png
old: /magic-mana-large.mse-symbol-font/mana_t_old.png
diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png
############################################################## Card fields ############################################################## Card fields
card style: card style:
......
...@@ -94,6 +94,9 @@ init script: ...@@ -94,6 +94,9 @@ init script:
############################################################## Set fields ############################################################## Set fields
set field:
type: info
name: Set Information
set field: set field:
type: text type: text
name: title name: title
...@@ -107,6 +110,9 @@ set field: ...@@ -107,6 +110,9 @@ set field:
set field: set field:
type: text type: text
name: copyright name: copyright
set field:
type: info
name: Defaults and Automation
set field: set field:
type: color type: color
name: border color name: border color
...@@ -129,6 +135,14 @@ set field: ...@@ -129,6 +135,14 @@ set field:
initial: no initial: no
description: Should card numbers be shown on the cards? description: Should card numbers be shown on the cards?
############################# Default style
default set style:
title:
padding left: 2
font:
size: 16
############################################################## Card fields ############################################################## Card fields
############################# Background stuff ############################# Background stuff
......
...@@ -97,5 +97,10 @@ class KeywordReminderTextValue : public KeywordTextValue { ...@@ -97,5 +97,10 @@ class KeywordReminderTextValue : public KeywordTextValue {
void highlight(const String& code, const vector<ScriptParseError>& errors); void highlight(const String& code, const vector<ScriptParseError>& errors);
}; };
/// Changing the mode of a keyword
class ChangeKeywordModeAction : public Action {
};
// ----------------------------------------------------------------------------- : EOF // ----------------------------------------------------------------------------- : EOF
#endif #endif
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/artprov.h> #include <wx/artprov.h>
DECLARE_TYPEOF_COLLECTION(KeywordParamP);
DECLARE_TYPEOF_COLLECTION(KeywordModeP);
// ----------------------------------------------------------------------------- : KeywordsPanel // ----------------------------------------------------------------------------- : KeywordsPanel
KeywordsPanel::KeywordsPanel(Window* parent, int id) KeywordsPanel::KeywordsPanel(Window* parent, int id)
...@@ -36,6 +39,8 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id) ...@@ -36,6 +39,8 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id)
reminder = new TextCtrl(panel, wxID_ANY, true); // allow multiline for wordwrap reminder = new TextCtrl(panel, wxID_ANY, true); // allow multiline for wordwrap
rules = new TextCtrl(panel, wxID_ANY, true); rules = new TextCtrl(panel, wxID_ANY, true);
errors = new wxStaticText(panel, wxID_ANY, _("")); errors = new wxStaticText(panel, wxID_ANY, _(""));
mode = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr);
add_param = new wxButton(panel, ID_KEYWORD_ADD_PARAM, _("Insert Parameter"));
// warning about fixed keywords // warning about fixed keywords
fixedL = new wxStaticText(panel, wxID_ANY, _("")); fixedL = new wxStaticText(panel, wxID_ANY, _(""));
wxStaticBitmap* fixedI = new wxStaticBitmap(panel, wxID_ANY, wxArtProvider::GetBitmap(wxART_WARNING)); wxStaticBitmap* fixedI = new wxStaticBitmap(panel, wxID_ANY, wxArtProvider::GetBitmap(wxART_WARNING));
...@@ -52,12 +57,15 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id) ...@@ -52,12 +57,15 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id)
wxSizer* s1 = new wxBoxSizer(wxVERTICAL); wxSizer* s1 = new wxBoxSizer(wxVERTICAL);
s1->Add(new wxStaticText(panel, wxID_ANY, _("Keyword:")), 0); s1->Add(new wxStaticText(panel, wxID_ANY, _("Keyword:")), 0);
s1->Add(keyword, 0, wxEXPAND | wxTOP, 2); s1->Add(keyword, 0, wxEXPAND | wxTOP, 2);
s1->Add(new wxStaticText(panel, wxID_ANY, _("Mode:")), 0, wxTOP, 2);
s1->Add(mode, 0, wxEXPAND | wxTOP, 2);
sp->Add(s1, 0, wxEXPAND | wxLEFT, 2); sp->Add(s1, 0, wxEXPAND | wxLEFT, 2);
sp->Add(new wxStaticLine(panel), 0, wxEXPAND | wxTOP | wxBOTTOM, 8); sp->Add(new wxStaticLine(panel), 0, wxEXPAND | wxTOP | wxBOTTOM, 8);
wxSizer* s2 = new wxBoxSizer(wxVERTICAL); wxSizer* s2 = new wxBoxSizer(wxVERTICAL);
s2->Add(new wxStaticText(panel, wxID_ANY, _("Match:")), 0); s2->Add(new wxStaticText(panel, wxID_ANY, _("Match:")), 0);
s2->Add(match, 0, wxEXPAND | wxTOP, 2); s2->Add(match, 0, wxEXPAND | wxTOP, 2);
s2->Add(new wxStaticText(panel, wxID_ANY, _("Parameters:")), 0, wxTOP, 6); s2->Add(new wxStaticText(panel, wxID_ANY, _("Parameters:")), 0, wxTOP, 6);
s2->Add(add_param, 0, wxALIGN_LEFT | wxTOP, 2);
sp->Add(s2, 0, wxEXPAND | wxLEFT, 2); sp->Add(s2, 0, wxEXPAND | wxLEFT, 2);
sp->Add(new wxStaticLine(panel), 0, wxEXPAND | wxTOP | wxBOTTOM, 8); sp->Add(new wxStaticLine(panel), 0, wxEXPAND | wxTOP | wxBOTTOM, 8);
wxSizer* s3 = new wxBoxSizer(wxVERTICAL); wxSizer* s3 = new wxBoxSizer(wxVERTICAL);
...@@ -127,6 +135,8 @@ void KeywordsPanel::onUpdateUI(wxUpdateUIEvent& ev) { ...@@ -127,6 +135,8 @@ void KeywordsPanel::onUpdateUI(wxUpdateUIEvent& ev) {
case ID_KEYWORD_PREV: ev.Enable(list->canSelectPrevious()); break; case ID_KEYWORD_PREV: ev.Enable(list->canSelectPrevious()); break;
case ID_KEYWORD_NEXT: ev.Enable(list->canSelectNext()); break; case ID_KEYWORD_NEXT: ev.Enable(list->canSelectNext()); break;
case ID_KEYWORD_REMOVE: ev.Enable(list->getKeyword() && !list->getKeyword()->fixed); break; case ID_KEYWORD_REMOVE: ev.Enable(list->getKeyword() && !list->getKeyword()->fixed); break;
case ID_KEYWORD_ADD_PARAM:
break;
} }
} }
...@@ -147,6 +157,14 @@ void KeywordsPanel::onCommand(int id) { ...@@ -147,6 +157,14 @@ void KeywordsPanel::onCommand(int id) {
set->actions.add(new RemoveKeywordAction(*set, list->getKeyword())); set->actions.add(new RemoveKeywordAction(*set, list->getKeyword()));
} }
break; break;
case ID_KEYWORD_ADD_PARAM: {
wxMenu param_menu;
FOR_EACH(p, set->game->keyword_parameter_types) {
param_menu.Append(wxID_ANY, p->name);
}
add_param->PopupMenu(&param_menu, 0, add_param->GetSize().y);
break;
}
} }
} }
...@@ -174,6 +192,12 @@ void KeywordsPanel::onChangeSet() { ...@@ -174,6 +192,12 @@ void KeywordsPanel::onChangeSet() {
match ->getStyle().font.font.SetPointSize(10); match ->getStyle().font.font.SetPointSize(10);
reminder->updateSize(); reminder->updateSize();
rules ->setSet(set); rules ->setSet(set);
// parameter & mode lists
add_param->Enable(false);
mode->Clear();
FOR_EACH(m, set->game->keyword_modes) {
mode->Append(m->name);
}
// re-layout // re-layout
panel->Layout(); panel->Layout();
} }
...@@ -198,12 +222,16 @@ void KeywordsPanel::onKeywordSelect(KeywordSelectEvent& ev) { ...@@ -198,12 +222,16 @@ void KeywordsPanel::onKeywordSelect(KeywordSelectEvent& ev) {
shared_ptr<KeywordReminderTextValue> reminder_value(new KeywordReminderTextValue(reminder->getFieldP(), &kw, !kw.fixed)); shared_ptr<KeywordReminderTextValue> reminder_value(new KeywordReminderTextValue(reminder->getFieldP(), &kw, !kw.fixed));
reminder->setValue(reminder_value); reminder->setValue(reminder_value);
errors->SetLabel(reminder_value->errors); errors->SetLabel(reminder_value->errors);
add_param->Enable(!kw.fixed && !set->game->keyword_parameter_types.empty());
mode->SetStringSelection(kw.mode);
sp->Layout(); sp->Layout();
} else { } else {
keyword ->setValue(nullptr); keyword ->setValue(nullptr);
match ->setValue(nullptr); match ->setValue(nullptr);
rules ->setValue(nullptr); rules ->setValue(nullptr);
reminder->setValue(nullptr); reminder->setValue(nullptr);
add_param->Enable(false);
mode ->Enable(false);
} }
} }
......
...@@ -52,6 +52,8 @@ class KeywordsPanel : public SetWindowPanel { ...@@ -52,6 +52,8 @@ class KeywordsPanel : public SetWindowPanel {
wxStaticText* fixedL; wxStaticText* fixedL;
wxSizer* fixed; wxSizer* fixed;
wxStaticText* errors; wxStaticText* errors;
wxChoice* mode;
wxButton* add_param;
/// Controls to edit a parameter /// Controls to edit a parameter
struct ParamEditor { struct ParamEditor {
wxStaticText* label; wxStaticText* label;
......
...@@ -57,7 +57,7 @@ bool DataViewer::drawEditing() const { return false; } ...@@ -57,7 +57,7 @@ bool DataViewer::drawEditing() const { return false; }
bool DataViewer::drawFocus() const { return false; } bool DataViewer::drawFocus() const { return false; }
wxPen DataViewer::borderPen(bool) const { return wxPen(); } wxPen DataViewer::borderPen(bool) const { return wxPen(); }
ValueViewer* DataViewer::focusedViewer() const { return nullptr; } ValueViewer* DataViewer::focusedViewer() const { return nullptr; }
Context& DataViewer::getContext() const { return set->getContext(); } Context& DataViewer::getContext() const { return set->getContext(card); }
Rotation DataViewer::getRotation() const { Rotation DataViewer::getRotation() const {
if (!stylesheet) stylesheet = set->stylesheet; if (!stylesheet) stylesheet = set->stylesheet;
...@@ -68,7 +68,7 @@ Rotation DataViewer::getRotation() const { ...@@ -68,7 +68,7 @@ Rotation DataViewer::getRotation() const {
// ----------------------------------------------------------------------------- : Setting data // ----------------------------------------------------------------------------- : Setting data
void DataViewer::setCard(const CardP& card) { void DataViewer::setCard(const CardP& card) {
if (!card) return; // TODO: clear editor? if (!card) return; // TODO: clear vie?
assert(set); assert(set);
this->card = card; this->card = card;
stylesheet = set->stylesheetFor(card); stylesheet = set->stylesheetFor(card);
......
...@@ -108,6 +108,8 @@ enum ChildMenuID { ...@@ -108,6 +108,8 @@ enum ChildMenuID {
, ID_KEYWORD_REMOVE , ID_KEYWORD_REMOVE
, ID_KEYWORD_PREV , ID_KEYWORD_PREV
, ID_KEYWORD_NEXT , ID_KEYWORD_NEXT
, ID_KEYWORD_ADD_PARAM
, ID_KEYWORD_REF_PARAM
// Format menu // Format menu
, ID_FORMAT_BOLD = 1201 , ID_FORMAT_BOLD = 1201
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment