Permalink
Browse files

export players deck

  • Loading branch information...
Manuel-777 committed Oct 30, 2018
1 parent 5306960 commit eccbc6118275bd4d5b83867b06a53be8317aae2b
Showing with 14 additions and 2 deletions.
  1. +14 −2 window_main/renderer.js
@@ -2753,6 +2753,9 @@ function open_match(id) {
drawDeck(dl, match.playerDeck);
$('<div class="button_simple centered exportDeckPlayer">Export to Arena</div>').appendTo(dl);
$('<div class="button_simple centered exportDeckStandardPlayer">Export to .txt</div>').appendTo(dl);
var flt = $('<div class="flex_item" style="flex-direction: row-reverse;"></div>')
var fltl = $('<div class="flex_item"></div>')
var r = $('<div class="rank"></div>'); r.appendTo(fltl);
@@ -2783,8 +2786,8 @@ function open_match(id) {
match.oppDeck.sideboard.sort(compare_cards);
drawDeck(odl, match.oppDeck);
$('<div class="button_simple exportDeck">Export to Arena</div>').appendTo(odl);
$('<div class="button_simple exportDeckStandard">Export to .txt</div>').appendTo(odl);
$('<div class="button_simple centered exportDeck">Export to Arena</div>').appendTo(odl);
$('<div class="button_simple centered exportDeckStandard">Export to .txt</div>').appendTo(odl);
dl.appendTo(fld);
odl.appendTo(fld);
@@ -2796,6 +2799,15 @@ function open_match(id) {
shell.openItem(path.join(actionLogDir, id+'.txt'));
});
$(".exportDeckPlayer").click(function () {
var list = get_deck_export(match.playerDeck);
ipc_send('set_clipboard', list);
});
$(".exportDeckStandardPlayer").click(function () {
var list = get_deck_export_txt(match.playerDeck);
ipc_send('export_txt', {str: list, name: match.playerDeck.name});
});
$(".exportDeck").click(function () {
var list = get_deck_export(match.oppDeck);
ipc_send('set_clipboard', list);

0 comments on commit eccbc61

Please sign in to comment.