mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
indent code
This commit is contained in:
@@ -212,6 +212,8 @@ include('../globalHTML/header-1.php');
|
|||||||
<h5>{right#}</h5><h5>Moves the text # pixels right</h5>
|
<h5>{right#}</h5><h5>Moves the text # pixels right</h5>
|
||||||
<h5>{shadow#}</h5><h5>Changes the shadow distance to # (use {shadow0} to remove the shadow)</h5>
|
<h5>{shadow#}</h5><h5>Changes the shadow distance to # (use {shadow0} to remove the shadow)</h5>
|
||||||
<h5>{shadowcolor#}</h5><h5>Changes the shadow color to #</h5>
|
<h5>{shadowcolor#}</h5><h5>Changes the shadow color to #</h5>
|
||||||
|
<h5>{indent}</h5><h5>Indents the rest of the paragraph to the current point</h5>
|
||||||
|
<h5>{/indent}</h5><h5>Removes paragraph indendation</h5>
|
||||||
<h5>{kerning#}</h5><h5>Changes the kerning (letter spacing) to #</h5>
|
<h5>{kerning#}</h5><h5>Changes the kerning (letter spacing) to #</h5>
|
||||||
<h5>{roll___}</h5><h5>Used for dice-rolling cards (like from AFR) - whatever you fill in for '___' will be bolded, and alternating paragraphs will be shaded.</h5>
|
<h5>{roll___}</h5><h5>Used for dice-rolling cards (like from AFR) - whatever you fill in for '___' will be bolded, and alternating paragraphs will be shaded.</h5>
|
||||||
<h5>Notes</h5><h5>For colors, you may use HTML color codes (ie 'green'), hex color codes (ie '#00FF00'), or rgb (ie 'rgb(0,255,0)'')</h5>
|
<h5>Notes</h5><h5>For colors, you may use HTML color codes (ie 'green'), hex color codes (ie '#00FF00'), or rgb (ie 'rgb(0,255,0)'')</h5>
|
||||||
|
@@ -823,6 +823,7 @@ function writeText(textObject, targetContext) {
|
|||||||
wordToWrite = null;
|
wordToWrite = null;
|
||||||
if (possibleCode == 'line') {
|
if (possibleCode == 'line') {
|
||||||
newLine = true;
|
newLine = true;
|
||||||
|
startingCurrentX = 0;
|
||||||
newLineSpacing = textSize * 0.35;
|
newLineSpacing = textSize * 0.35;
|
||||||
} else if (possibleCode == 'lns' || possibleCode == 'linenospace') {
|
} else if (possibleCode == 'lns' || possibleCode == 'linenospace') {
|
||||||
newLine = true;
|
newLine = true;
|
||||||
@@ -931,6 +932,10 @@ function writeText(textObject, targetContext) {
|
|||||||
lineContext.drawImage(manaSymbols[findManaSymbolIndex('chaos')].image, currentX + canvasMargin, canvasMargin, planechaseHeight * 1.2, planechaseHeight);
|
lineContext.drawImage(manaSymbols[findManaSymbolIndex('chaos')].image, currentX + canvasMargin, canvasMargin, planechaseHeight * 1.2, planechaseHeight);
|
||||||
currentX += planechaseHeight * 1.3;
|
currentX += planechaseHeight * 1.3;
|
||||||
startingCurrentX += planechaseHeight * 1.3;
|
startingCurrentX += planechaseHeight * 1.3;
|
||||||
|
} else if (possibleCode == 'indent') {
|
||||||
|
startingCurrentX += currentX;
|
||||||
|
} else if (possibleCode == '/indent') {
|
||||||
|
startingCurrentX = 0;
|
||||||
} else if (possibleCode.includes('elemid')) {
|
} else if (possibleCode.includes('elemid')) {
|
||||||
if (document.querySelector('#' + word.replace('{elemid', '').replace('}', ''))) {
|
if (document.querySelector('#' + word.replace('{elemid', '').replace('}', ''))) {
|
||||||
wordToWrite = document.querySelector('#' + word.replace('{elemid', '').replace('}', '')).value || '';
|
wordToWrite = document.querySelector('#' + word.replace('{elemid', '').replace('}', '')).value || '';
|
||||||
@@ -1600,7 +1605,7 @@ function changeCardIndex() {
|
|||||||
if (card.text.mana) {card.text.mana.text = cardToImport.mana_cost || '';}
|
if (card.text.mana) {card.text.mana.text = cardToImport.mana_cost || '';}
|
||||||
if (card.text.type) {card.text.type.text = cardToImport.type_line || '';}
|
if (card.text.type) {card.text.type.text = cardToImport.type_line || '';}
|
||||||
if (card.text.rules) {
|
if (card.text.rules) {
|
||||||
var rulesText = curlyQuotes((cardToImport.oracle_text || '').replace('(', '{i}(').replace(')', '){/i}')).replace(/{Q}/g, '{untap}');
|
var rulesText = curlyQuotes((cardToImport.oracle_text || '').replace('(', '{i}(').replace(')', '){/i}')).replace(/{Q}/g, '{untap}').replace(/• /g, '• {indent}');
|
||||||
card.text.rules.text = rulesText;
|
card.text.rules.text = rulesText;
|
||||||
if (cardToImport.flavor_text) {
|
if (cardToImport.flavor_text) {
|
||||||
var flavorText = cardToImport.flavor_text;
|
var flavorText = cardToImport.flavor_text;
|
||||||
|
Reference in New Issue
Block a user