From 59bcd8052adf130a1ffd0542c08045044b34902d Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Sun, 10 May 2020 14:46:50 +0200 Subject: [PATCH] add new (old) 'no border' deck --- web/briskin5/Obj/briskin5.phh | 7 +++++-- web/briskin5/briskin5.js | 1 + web/briskin5/dnd.js | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index bae5ff0..7ce17b0 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -69,16 +69,19 @@ $table_wellarr = Array( 'it' => Array ( 'Benvenuto al tavolo. Se almeno tre gioc 'en' => Array ( 'EN Benvenuto al tavolo. Se almeno tre giocatori non sbloccano l\'uscita cliccando il lucchetto, chi esce non può risedersi a un qualunque tavolo per '.floor(BAN_TIME/60).' minuti.') ); -// FIXME - DYNAMIC WITH CACHE AND RELOAD FROM DB +// DECK STUFF - FIXME - DYNAMIC WITH CACHE AND RELOAD FROM DB function deck_keys() { - return array('xx', 'yy'); + return array('xx', 'nb', 'yy'); } +// DECK STUFF function deck_id2descr($id, $lang) { if ($id == 'xx') return 'carte originali'; + else if ($id == 'nb') + return 'carte senza bordi'; else if ($id == 'yy') return 'carte strette'; diff --git a/web/briskin5/briskin5.js b/web/briskin5/briskin5.js index d66c379..c3dacea 100644 --- a/web/briskin5/briskin5.js +++ b/web/briskin5/briskin5.js @@ -322,6 +322,7 @@ function set_iscalling(idx) var preferences = new Preferences(true, 'xx', 'xx'); // FIXME move it in the html dynamic generation scope var deck_list = { 'xx': 'Normal cards', + 'nb': 'No border cards', 'yy': 'Slim cards' } function preferences_init() { diff --git a/web/briskin5/dnd.js b/web/briskin5/dnd.js index 309d197..1e75cb4 100644 --- a/web/briskin5/dnd.js +++ b/web/briskin5/dnd.js @@ -46,8 +46,8 @@ var cards_we_n; var takes_we_n; /* width of images */ -var cards_widths = {'xx': 65, 'yy': 54}; -var cards_heights = {'xx': 111, 'yy': 111}; +var cards_widths = {'xx': 65, 'nb': 56, 'yy': 54}; +var cards_heights = {'xx': 111, 'nb': 102, 'yy': 111}; var cards_width = cards_widths[g_deck]; var cards_width_d2 = Math.ceil(cards_width / 2); -- 2.17.1