diff --git a/css/style-8.css b/css/style-8.css index 5db957f1..da12dc3b 100644 --- a/css/style-8.css +++ b/css/style-8.css @@ -702,6 +702,9 @@ textarea.input { align-items: center; height: 6rem; } +.mask-option > img { + max-height: 6rem; +} /*Frame Elements*/ .frame-element { display: grid; diff --git a/img/frames/modal/borderless/ab.png b/img/frames/modal/borderless/ab.png new file mode 100644 index 00000000..97dfc899 Binary files /dev/null and b/img/frames/modal/borderless/ab.png differ diff --git a/img/frames/modal/borderless/abThumb.png b/img/frames/modal/borderless/abThumb.png new file mode 100644 index 00000000..c75103c2 Binary files /dev/null and b/img/frames/modal/borderless/abThumb.png differ diff --git a/img/frames/modal/borderless/af.png b/img/frames/modal/borderless/af.png new file mode 100644 index 00000000..be0645b5 Binary files /dev/null and b/img/frames/modal/borderless/af.png differ diff --git a/img/frames/modal/borderless/afThumb.png b/img/frames/modal/borderless/afThumb.png new file mode 100644 index 00000000..e5833658 Binary files /dev/null and b/img/frames/modal/borderless/afThumb.png differ diff --git a/img/frames/modal/borderless/bb.png b/img/frames/modal/borderless/bb.png new file mode 100644 index 00000000..f8b0e5dc Binary files /dev/null and b/img/frames/modal/borderless/bb.png differ diff --git a/img/frames/modal/borderless/bbThumb.png b/img/frames/modal/borderless/bbThumb.png new file mode 100644 index 00000000..1a9c226c Binary files /dev/null and b/img/frames/modal/borderless/bbThumb.png differ diff --git a/img/frames/modal/borderless/bf.png b/img/frames/modal/borderless/bf.png new file mode 100644 index 00000000..603dab02 Binary files /dev/null and b/img/frames/modal/borderless/bf.png differ diff --git a/img/frames/modal/borderless/bfThumb.png b/img/frames/modal/borderless/bfThumb.png new file mode 100644 index 00000000..8bc35653 Binary files /dev/null and b/img/frames/modal/borderless/bfThumb.png differ diff --git a/img/frames/modal/borderless/gb.png b/img/frames/modal/borderless/gb.png new file mode 100644 index 00000000..e772ece1 Binary files /dev/null and b/img/frames/modal/borderless/gb.png differ diff --git a/img/frames/modal/borderless/gbThumb.png b/img/frames/modal/borderless/gbThumb.png new file mode 100644 index 00000000..fbad33de Binary files /dev/null and b/img/frames/modal/borderless/gbThumb.png differ diff --git a/img/frames/modal/borderless/gf.png b/img/frames/modal/borderless/gf.png new file mode 100644 index 00000000..9e2cdabd Binary files /dev/null and b/img/frames/modal/borderless/gf.png differ diff --git a/img/frames/modal/borderless/gfThumb.png b/img/frames/modal/borderless/gfThumb.png new file mode 100644 index 00000000..50d33a40 Binary files /dev/null and b/img/frames/modal/borderless/gfThumb.png differ diff --git a/img/frames/modal/borderless/mb.png b/img/frames/modal/borderless/mb.png new file mode 100644 index 00000000..6155f19b Binary files /dev/null and b/img/frames/modal/borderless/mb.png differ diff --git a/img/frames/modal/borderless/mbThumb.png b/img/frames/modal/borderless/mbThumb.png new file mode 100644 index 00000000..064bd61c Binary files /dev/null and b/img/frames/modal/borderless/mbThumb.png differ diff --git a/img/frames/modal/borderless/mf.png b/img/frames/modal/borderless/mf.png new file mode 100644 index 00000000..0da16fa2 Binary files /dev/null and b/img/frames/modal/borderless/mf.png differ diff --git a/img/frames/modal/borderless/mfThumb.png b/img/frames/modal/borderless/mfThumb.png new file mode 100644 index 00000000..b5d17f51 Binary files /dev/null and b/img/frames/modal/borderless/mfThumb.png differ diff --git a/img/frames/modal/borderless/pinline.svg b/img/frames/modal/borderless/pinline.svg new file mode 100644 index 00000000..336afc3a --- /dev/null +++ b/img/frames/modal/borderless/pinline.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/modal/borderless/pinlineThumb.png b/img/frames/modal/borderless/pinlineThumb.png new file mode 100644 index 00000000..d239e7f9 Binary files /dev/null and b/img/frames/modal/borderless/pinlineThumb.png differ diff --git a/img/frames/modal/borderless/rb.png b/img/frames/modal/borderless/rb.png new file mode 100644 index 00000000..77120c85 Binary files /dev/null and b/img/frames/modal/borderless/rb.png differ diff --git a/img/frames/modal/borderless/rbThumb.png b/img/frames/modal/borderless/rbThumb.png new file mode 100644 index 00000000..69cc56d6 Binary files /dev/null and b/img/frames/modal/borderless/rbThumb.png differ diff --git a/img/frames/modal/borderless/rf.png b/img/frames/modal/borderless/rf.png new file mode 100644 index 00000000..cd52f8d0 Binary files /dev/null and b/img/frames/modal/borderless/rf.png differ diff --git a/img/frames/modal/borderless/rfThumb.png b/img/frames/modal/borderless/rfThumb.png new file mode 100644 index 00000000..d84ad5bd Binary files /dev/null and b/img/frames/modal/borderless/rfThumb.png differ diff --git a/img/frames/modal/borderless/ub.png b/img/frames/modal/borderless/ub.png new file mode 100644 index 00000000..5d93ff27 Binary files /dev/null and b/img/frames/modal/borderless/ub.png differ diff --git a/img/frames/modal/borderless/ubThumb.png b/img/frames/modal/borderless/ubThumb.png new file mode 100644 index 00000000..9822138f Binary files /dev/null and b/img/frames/modal/borderless/ubThumb.png differ diff --git a/img/frames/modal/borderless/uf.png b/img/frames/modal/borderless/uf.png new file mode 100644 index 00000000..70de8783 Binary files /dev/null and b/img/frames/modal/borderless/uf.png differ diff --git a/img/frames/modal/borderless/ufThumb.png b/img/frames/modal/borderless/ufThumb.png new file mode 100644 index 00000000..1261f2be Binary files /dev/null and b/img/frames/modal/borderless/ufThumb.png differ diff --git a/img/frames/modal/borderless/wb.png b/img/frames/modal/borderless/wb.png new file mode 100644 index 00000000..aba93c2f Binary files /dev/null and b/img/frames/modal/borderless/wb.png differ diff --git a/img/frames/modal/borderless/wbThumb.png b/img/frames/modal/borderless/wbThumb.png new file mode 100644 index 00000000..5adb9fb7 Binary files /dev/null and b/img/frames/modal/borderless/wbThumb.png differ diff --git a/img/frames/modal/borderless/wf.png b/img/frames/modal/borderless/wf.png new file mode 100644 index 00000000..b18daf34 Binary files /dev/null and b/img/frames/modal/borderless/wf.png differ diff --git a/img/frames/modal/borderless/wfThumb.png b/img/frames/modal/borderless/wfThumb.png new file mode 100644 index 00000000..9e3c81c9 Binary files /dev/null and b/img/frames/modal/borderless/wfThumb.png differ diff --git a/img/frames/modal/nickname/ab.png b/img/frames/modal/nickname/ab.png new file mode 100644 index 00000000..1366dde7 Binary files /dev/null and b/img/frames/modal/nickname/ab.png differ diff --git a/img/frames/modal/nickname/abThumb.png b/img/frames/modal/nickname/abThumb.png new file mode 100644 index 00000000..5429acfe Binary files /dev/null and b/img/frames/modal/nickname/abThumb.png differ diff --git a/img/frames/modal/nickname/af.png b/img/frames/modal/nickname/af.png new file mode 100644 index 00000000..9bb8c9fb Binary files /dev/null and b/img/frames/modal/nickname/af.png differ diff --git a/img/frames/modal/nickname/afThumb.png b/img/frames/modal/nickname/afThumb.png new file mode 100644 index 00000000..acec2c75 Binary files /dev/null and b/img/frames/modal/nickname/afThumb.png differ diff --git a/img/frames/modal/nickname/bb.png b/img/frames/modal/nickname/bb.png new file mode 100644 index 00000000..fc37d6b4 Binary files /dev/null and b/img/frames/modal/nickname/bb.png differ diff --git a/img/frames/modal/nickname/bbThumb.png b/img/frames/modal/nickname/bbThumb.png new file mode 100644 index 00000000..a8184c88 Binary files /dev/null and b/img/frames/modal/nickname/bbThumb.png differ diff --git a/img/frames/modal/nickname/bf.png b/img/frames/modal/nickname/bf.png new file mode 100644 index 00000000..5811473c Binary files /dev/null and b/img/frames/modal/nickname/bf.png differ diff --git a/img/frames/modal/nickname/bfThumb.png b/img/frames/modal/nickname/bfThumb.png new file mode 100644 index 00000000..bc5941d4 Binary files /dev/null and b/img/frames/modal/nickname/bfThumb.png differ diff --git a/img/frames/modal/nickname/cutout.svg b/img/frames/modal/nickname/cutout.svg new file mode 100644 index 00000000..7ea5b4c5 --- /dev/null +++ b/img/frames/modal/nickname/cutout.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/modal/nickname/cutoutThumb.png b/img/frames/modal/nickname/cutoutThumb.png new file mode 100644 index 00000000..e15080c0 Binary files /dev/null and b/img/frames/modal/nickname/cutoutThumb.png differ diff --git a/img/frames/modal/nickname/gb.png b/img/frames/modal/nickname/gb.png new file mode 100644 index 00000000..315cc449 Binary files /dev/null and b/img/frames/modal/nickname/gb.png differ diff --git a/img/frames/modal/nickname/gbThumb.png b/img/frames/modal/nickname/gbThumb.png new file mode 100644 index 00000000..00631cf7 Binary files /dev/null and b/img/frames/modal/nickname/gbThumb.png differ diff --git a/img/frames/modal/nickname/gf.png b/img/frames/modal/nickname/gf.png new file mode 100644 index 00000000..f8d04eae Binary files /dev/null and b/img/frames/modal/nickname/gf.png differ diff --git a/img/frames/modal/nickname/gfThumb.png b/img/frames/modal/nickname/gfThumb.png new file mode 100644 index 00000000..2e656899 Binary files /dev/null and b/img/frames/modal/nickname/gfThumb.png differ diff --git a/img/frames/modal/nickname/mb.png b/img/frames/modal/nickname/mb.png new file mode 100644 index 00000000..20be613d Binary files /dev/null and b/img/frames/modal/nickname/mb.png differ diff --git a/img/frames/modal/nickname/mbThumb.png b/img/frames/modal/nickname/mbThumb.png new file mode 100644 index 00000000..1d970f7c Binary files /dev/null and b/img/frames/modal/nickname/mbThumb.png differ diff --git a/img/frames/modal/nickname/mf.png b/img/frames/modal/nickname/mf.png new file mode 100644 index 00000000..4fd9218d Binary files /dev/null and b/img/frames/modal/nickname/mf.png differ diff --git a/img/frames/modal/nickname/mfThumb.png b/img/frames/modal/nickname/mfThumb.png new file mode 100644 index 00000000..fc04f18f Binary files /dev/null and b/img/frames/modal/nickname/mfThumb.png differ diff --git a/img/frames/modal/nickname/pinline.svg b/img/frames/modal/nickname/pinline.svg new file mode 100644 index 00000000..439db228 --- /dev/null +++ b/img/frames/modal/nickname/pinline.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/modal/nickname/pinlineThumb.png b/img/frames/modal/nickname/pinlineThumb.png new file mode 100644 index 00000000..27ee5e2b Binary files /dev/null and b/img/frames/modal/nickname/pinlineThumb.png differ diff --git a/img/frames/modal/nickname/rb.png b/img/frames/modal/nickname/rb.png new file mode 100644 index 00000000..06f94b29 Binary files /dev/null and b/img/frames/modal/nickname/rb.png differ diff --git a/img/frames/modal/nickname/rbThumb.png b/img/frames/modal/nickname/rbThumb.png new file mode 100644 index 00000000..fad0ecf6 Binary files /dev/null and b/img/frames/modal/nickname/rbThumb.png differ diff --git a/img/frames/modal/nickname/rf.png b/img/frames/modal/nickname/rf.png new file mode 100644 index 00000000..52e38515 Binary files /dev/null and b/img/frames/modal/nickname/rf.png differ diff --git a/img/frames/modal/nickname/rfThumb.png b/img/frames/modal/nickname/rfThumb.png new file mode 100644 index 00000000..d1b18012 Binary files /dev/null and b/img/frames/modal/nickname/rfThumb.png differ diff --git a/img/frames/modal/nickname/ub.png b/img/frames/modal/nickname/ub.png new file mode 100644 index 00000000..905d7bfc Binary files /dev/null and b/img/frames/modal/nickname/ub.png differ diff --git a/img/frames/modal/nickname/ubThumb.png b/img/frames/modal/nickname/ubThumb.png new file mode 100644 index 00000000..b9c67408 Binary files /dev/null and b/img/frames/modal/nickname/ubThumb.png differ diff --git a/img/frames/modal/nickname/uf.png b/img/frames/modal/nickname/uf.png new file mode 100644 index 00000000..e2c3de32 Binary files /dev/null and b/img/frames/modal/nickname/uf.png differ diff --git a/img/frames/modal/nickname/ufThumb.png b/img/frames/modal/nickname/ufThumb.png new file mode 100644 index 00000000..46d77b29 Binary files /dev/null and b/img/frames/modal/nickname/ufThumb.png differ diff --git a/img/frames/modal/nickname/wb.png b/img/frames/modal/nickname/wb.png new file mode 100644 index 00000000..d75d8e33 Binary files /dev/null and b/img/frames/modal/nickname/wb.png differ diff --git a/img/frames/modal/nickname/wbThumb.png b/img/frames/modal/nickname/wbThumb.png new file mode 100644 index 00000000..566a9f82 Binary files /dev/null and b/img/frames/modal/nickname/wbThumb.png differ diff --git a/img/frames/modal/nickname/wf.png b/img/frames/modal/nickname/wf.png new file mode 100644 index 00000000..d3fd997e Binary files /dev/null and b/img/frames/modal/nickname/wf.png differ diff --git a/img/frames/modal/nickname/wfThumb.png b/img/frames/modal/nickname/wfThumb.png new file mode 100644 index 00000000..f9746b49 Binary files /dev/null and b/img/frames/modal/nickname/wfThumb.png differ diff --git a/js/creator-20.js b/js/creator-20.js index 99ccb657..48644030 100644 --- a/js/creator-20.js +++ b/js/creator-20.js @@ -329,6 +329,7 @@ function loadFramePacks(framePackOptions = []) { loadScript("/js/frames/pack" + document.querySelector('#selectFramePack').value + ".js"); } function loadFramePack(frameOptions = availableFrames) { + resetDoubleClick(); document.querySelector('#frame-picker').innerHTML = null; frameOptions.forEach(item => { var frameOption = document.createElement('div'); @@ -361,6 +362,7 @@ function frameOptionClicked(event) { const clickedFrameOption = event.target.closest('.frame-option'); const newFrameIndex = getElementIndex(clickedFrameOption); if (newFrameIndex != selectedFrameIndex || document.querySelector('#mask-picker').innerHTML == '') { + resetDoubleClick(); Array.from(document.querySelectorAll('.frame-option.selected')).forEach(element => element.classList.remove('selected')); clickedFrameOption.classList.add('selected'); selectedFrameIndex = newFrameIndex; @@ -390,12 +392,12 @@ function frameOptionClicked(event) { const firstChild = document.querySelector('#mask-picker').firstChild; firstChild.classList.add('selected'); firstChild.click(); - } else if (button) { button.click(); lastFrameClick = null; } + } else if (button) { button.click(); resetDoubleClick(); } } function maskOptionClicked(event) { var button = doubleClick(event, 'mask'); const clickedMaskOption = event.target.closest('.mask-option'); - // (document.querySelector('.mask-option.selected').classList || document.querySelector('body').classList).remove('selected'); + (document.querySelector('.mask-option.selected').classList || document.querySelector('body').classList).remove('selected'); clickedMaskOption.classList.add('selected'); const newMaskIndex = getElementIndex(clickedMaskOption) if (newMaskIndex != selectedMaskIndex) { button = null; } @@ -403,7 +405,10 @@ function maskOptionClicked(event) { var selectedMaskName = 'No Mask' if (selectedMaskIndex > 0) {selectedMaskName = availableFrames[selectedFrameIndex].masks[selectedMaskIndex - 1].name;} document.querySelector('#selectedPreview').innerHTML = '(Selected: ' + availableFrames[selectedFrameIndex].name + ', ' + selectedMaskName + ')'; - if (button) { button.click(); lastMaskClick = null; } + if (button) { button.click(); resetDoubleClick(); } +} +function resetDoubleClick() { + lastFrameClick, lastMaskClick = null, null; } function doubleClick(event, maskOrFrame) { const currentClick = (new Date()).getTime(); diff --git a/js/frames/groupModal-1.js b/js/frames/groupModal-1.js index f6f88bf2..7e76c5e7 100644 --- a/js/frames/groupModal-1.js +++ b/js/frames/groupModal-1.js @@ -1,5 +1,7 @@ loadFramePacks([ {name:'Regular', value:'ModalRegular'}, + {name:'Borderless', value:'ModalBorderless'}, + {name:'Nickname', value:'ModalNickname'}, {name:'Short', value:'ModalShort'}, {name:'Short-Nickname', value:'ModalShortNickname'}, {name:'Addons', value:'disabled'}, diff --git a/js/frames/packModalBorderless.js b/js/frames/packModalBorderless.js new file mode 100644 index 00000000..afee9acd --- /dev/null +++ b/js/frames/packModalBorderless.js @@ -0,0 +1,57 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/modal/regular/reminder.svg', name:'Flipside'}, {src:'/img/frames/modal/borderless/pinline.svg', name:'Pinline'}, {src:'/img/frames/modal/modalMaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/modal/regular/textbox.svg', name:'Rules'}, {src:'/img/frames/modal/short/shortModalMaskBorder.png', name:'Border'}]; +var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733}; +//defines available frames +availableFrames = [ + {name:'White Frame (Front)', src:'/img/frames/modal/borderless/wf.png', masks:masks}, + {name:'Blue Frame (Front)', src:'/img/frames/modal/borderless/uf.png', masks:masks}, + {name:'Black Frame (Front)', src:'/img/frames/modal/borderless/bf.png', masks:masks}, + {name:'Red Frame (Front)', src:'/img/frames/modal/borderless/rf.png', masks:masks}, + {name:'Green Frame (Front)', src:'/img/frames/modal/borderless/gf.png', masks:masks}, + {name:'Multicolored Frame (Front)', src:'/img/frames/modal/borderless/mf.png', masks:masks}, + {name:'Artifact Frame (Front)', src:'/img/frames/modal/borderless/af.png', masks:masks}, + {name:'White Frame (Back)', src:'/img/frames/modal/borderless/wb.png', masks:masks}, + {name:'Blue Frame (Back)', src:'/img/frames/modal/borderless/ub.png', masks:masks}, + {name:'Black Frame (Back)', src:'/img/frames/modal/borderless/bb.png', masks:masks}, + {name:'Red Frame (Back)', src:'/img/frames/modal/borderless/rb.png', masks:masks}, + {name:'Green Frame (Back)', src:'/img/frames/modal/borderless/gb.png', masks:masks}, + {name:'Multicolored Frame (Back)', src:'/img/frames/modal/borderless/mb.png', masks:masks}, + {name:'Artifact Frame (Back)', src:'/img/frames/modal/borderless/ab.png', masks:masks}, + {name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds}, + {name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds}, + {name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds}, + {name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds}, + {name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds}, + {name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds}, + {name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds} +]; +//disables/enables the "Load Frame Version" button +document.querySelector('#loadFrameVersion').disabled = false; +//defines process for loading this version, if applicable +document.querySelector('#loadFrameVersion').onclick = async function() { + //resets things so that every frame doesn't have to + await resetCardIrregularities(); + //sets card version + card.version = 'modalBorderless'; + //art bounds + card.artBounds = {x:0, y:0, width:1, height:0.9224}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'}; + resetSetSymbol(); + //watermark bounds + card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305}; + resetWatermark(); + //text + loadTextOptions({ + mana: {name:'Mana Cost', text:'', y:0.0613, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0}, + title: {name:'Title', text:'', x:0.1614, y:0.0522, width:0.7534, height:0.0543, oneLine:true, font:'belerenb', size:0.0381}, + type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324}, + rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2572, size:0.0362}, + flipsideType: {name:'Flipside Type', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0234, color:'white', oneLine:true, font:'belerenb'}, + flipSideReminder: {name:'Flipside Text', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0258, color:'white', oneLine:true, align:'right'}, + pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'} + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file diff --git a/js/frames/packModalLegendCrownsNickname.js b/js/frames/packModalLegendCrownsNickname.js index 89d48d7e..fe29f2fa 100644 --- a/js/frames/packModalLegendCrownsNickname.js +++ b/js/frames/packModalLegendCrownsNickname.js @@ -10,7 +10,7 @@ availableFrames = [ {name:'Multicolored Legend Crown', src:'/img/frames/modal/crowns/nickname/m.png', bounds:bounds, complementary:8}, {name:'Artifact Legend Crown', src:'/img/frames/modal/crowns/nickname/a.png', bounds:bounds, complementary:8}, {name:'Land Legend Crown', src:'/img/frames/modal/crowns/nickname/l.png', bounds:bounds, complementary:8}, - {name:'Legend Crown Cutout', src:'/img/frames/modal/crowns/cutout.svg', erase:true} + {name:'Legend Crown Cutout', src:'/img/frames/modal/nickname/cutout.svg', erase:true} ]; //disables/enables the "Load Frame Version" button document.querySelector('#loadFrameVersion').disabled = true; diff --git a/js/frames/packModalNickname.js b/js/frames/packModalNickname.js new file mode 100644 index 00000000..a528ed6c --- /dev/null +++ b/js/frames/packModalNickname.js @@ -0,0 +1,58 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/modal/regular/reminder.svg', name:'Flipside'}, {src:'/img/frames/modal/nickname/pinline.svg', name:'Pinline'}, {src:'/img/frames/modal/modalMaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/modal/regular/textbox.svg', name:'Rules'}, {src:'/img/frames/modal/short/shortModalMaskBorder.png', name:'Border'}]; +var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733}; +//defines available frames +availableFrames = [ + {name:'White Frame (Front)', src:'/img/frames/modal/nickname/wf.png', masks:masks}, + {name:'Blue Frame (Front)', src:'/img/frames/modal/nickname/uf.png', masks:masks}, + {name:'Black Frame (Front)', src:'/img/frames/modal/nickname/bf.png', masks:masks}, + {name:'Red Frame (Front)', src:'/img/frames/modal/nickname/rf.png', masks:masks}, + {name:'Green Frame (Front)', src:'/img/frames/modal/nickname/gf.png', masks:masks}, + {name:'Multicolored Frame (Front)', src:'/img/frames/modal/nickname/mf.png', masks:masks}, + {name:'Artifact Frame (Front)', src:'/img/frames/modal/nickname/af.png', masks:masks}, + {name:'White Frame (Back)', src:'/img/frames/modal/nickname/wb.png', masks:masks}, + {name:'Blue Frame (Back)', src:'/img/frames/modal/nickname/ub.png', masks:masks}, + {name:'Black Frame (Back)', src:'/img/frames/modal/nickname/bb.png', masks:masks}, + {name:'Red Frame (Back)', src:'/img/frames/modal/nickname/rb.png', masks:masks}, + {name:'Green Frame (Back)', src:'/img/frames/modal/nickname/gb.png', masks:masks}, + {name:'Multicolored Frame (Back)', src:'/img/frames/modal/nickname/mb.png', masks:masks}, + {name:'Artifact Frame (Back)', src:'/img/frames/modal/nickname/ab.png', masks:masks}, + {name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds}, + {name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds}, + {name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds}, + {name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds}, + {name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds}, + {name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds}, + {name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds} +]; +//disables/enables the "Load Frame Version" button +document.querySelector('#loadFrameVersion').disabled = false; +//defines process for loading this version, if applicable +document.querySelector('#loadFrameVersion').onclick = async function() { + //resets things so that every frame doesn't have to + await resetCardIrregularities(); + //sets card version + card.version = 'modalNickname'; + //art bounds + card.artBounds = {x:0, y:0, width:1, height:0.9224}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'}; + resetSetSymbol(); + //watermark bounds + card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305}; + resetWatermark(); + //text + loadTextOptions({ + mana: {name:'Mana Cost', text:'', y:0.0613, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0}, + nickname: {name:'Nickname', text:'', x:0.1614, y:0.0522, width:0.7534, height:0.0543, oneLine:true, font:'belerenb', size:0.0381}, + title: {name:'Title', text:'', x:0.14, y:0.1129, width:0.72, height:0.0243, oneLine:true, font:'mplantini', size:0.0229, color:'white', shadowX:0.0014, shadowY:0.001, align:'center'}, + type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324}, + rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2572, size:0.0362}, + flipsideType: {name:'Flipside Type', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0234, color:'white', oneLine:true, font:'belerenb'}, + flipSideReminder: {name:'Flipside Text', text:'', x:0.068, y:0.892, width:0.364, height:0.0391, size:0.0258, color:'white', oneLine:true, align:'right'}, + pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'} + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file