Merge branch 'release' into stable
commit
a97055cb78
129
card.js
129
card.js
|
@ -7,10 +7,12 @@
|
||||||
* @extends H5P.EventDispatcher
|
* @extends H5P.EventDispatcher
|
||||||
* @param {Object} image
|
* @param {Object} image
|
||||||
* @param {number} id
|
* @param {number} id
|
||||||
|
* @param {string} alt
|
||||||
|
* @param {Object} l10n Localization
|
||||||
* @param {string} [description]
|
* @param {string} [description]
|
||||||
* @param {Object} [styles]
|
* @param {Object} [styles]
|
||||||
*/
|
*/
|
||||||
MemoryGame.Card = function (image, id, description, styles) {
|
MemoryGame.Card = function (image, id, alt, l10n, description, styles) {
|
||||||
/** @alias H5P.MemoryGame.Card# */
|
/** @alias H5P.MemoryGame.Card# */
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
@ -18,7 +20,9 @@
|
||||||
EventDispatcher.call(self);
|
EventDispatcher.call(self);
|
||||||
|
|
||||||
var path = H5P.getPath(image.path, id);
|
var path = H5P.getPath(image.path, id);
|
||||||
var width, height, margin, $card;
|
var width, height, $card, $wrapper, removedState, flippedState;
|
||||||
|
|
||||||
|
alt = alt || 'Missing description'; // Default for old games
|
||||||
|
|
||||||
if (image.width !== undefined && image.height !== undefined) {
|
if (image.width !== undefined && image.height !== undefined) {
|
||||||
if (image.width > image.height) {
|
if (image.width > image.height) {
|
||||||
|
@ -34,19 +38,54 @@
|
||||||
width = height = '100%';
|
width = height = '100%';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the cards label to make it accessible to users with a readspeaker
|
||||||
|
*
|
||||||
|
* @param {boolean} isMatched The card has been matched
|
||||||
|
* @param {boolean} announce Announce the current state of the card
|
||||||
|
* @param {boolean} reset Go back to the default label
|
||||||
|
*/
|
||||||
|
self.updateLabel = function (isMatched, announce, reset) {
|
||||||
|
|
||||||
|
// Determine new label from input params
|
||||||
|
var label = (reset ? l10n.cardUnturned : alt);
|
||||||
|
if (isMatched) {
|
||||||
|
label = l10n.cardMatched + ' ' + label;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the card's label
|
||||||
|
$wrapper.attr('aria-label', l10n.cardPrefix.replace('%num', $wrapper.index() + 1) + ' ' + label);
|
||||||
|
|
||||||
|
// Update disabled property
|
||||||
|
$wrapper.attr('aria-disabled', reset ? null : 'true');
|
||||||
|
|
||||||
|
// Announce the label change
|
||||||
|
if (announce) {
|
||||||
|
$wrapper.blur().focus(); // Announce card label
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flip card.
|
* Flip card.
|
||||||
*/
|
*/
|
||||||
self.flip = function () {
|
self.flip = function () {
|
||||||
|
if (flippedState) {
|
||||||
|
$wrapper.blur().focus(); // Announce card label again
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$card.addClass('h5p-flipped');
|
$card.addClass('h5p-flipped');
|
||||||
self.trigger('flip');
|
self.trigger('flip');
|
||||||
|
flippedState = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flip card back.
|
* Flip card back.
|
||||||
*/
|
*/
|
||||||
self.flipBack = function () {
|
self.flipBack = function () {
|
||||||
|
self.updateLabel(null, null, true); // Reset card label
|
||||||
$card.removeClass('h5p-flipped');
|
$card.removeClass('h5p-flipped');
|
||||||
|
flippedState = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,12 +93,16 @@
|
||||||
*/
|
*/
|
||||||
self.remove = function () {
|
self.remove = function () {
|
||||||
$card.addClass('h5p-matched');
|
$card.addClass('h5p-matched');
|
||||||
|
removedState = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset card to natural state
|
* Reset card to natural state
|
||||||
*/
|
*/
|
||||||
self.reset = function () {
|
self.reset = function () {
|
||||||
|
self.updateLabel(null, null, true); // Reset card label
|
||||||
|
flippedState = false;
|
||||||
|
removedState = false;
|
||||||
$card[0].classList.remove('h5p-flipped', 'h5p-matched');
|
$card[0].classList.remove('h5p-flipped', 'h5p-matched');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,15 +130,47 @@
|
||||||
* @param {H5P.jQuery} $container
|
* @param {H5P.jQuery} $container
|
||||||
*/
|
*/
|
||||||
self.appendTo = function ($container) {
|
self.appendTo = function ($container) {
|
||||||
// TODO: Translate alt attr
|
$wrapper = $('<li class="h5p-memory-wrap" tabindex="-1" role="button"><div class="h5p-memory-card">' +
|
||||||
$card = $('<li class="h5p-memory-wrap"><div class="h5p-memory-card" role="button" tabindex="1">' +
|
|
||||||
'<div class="h5p-front"' + (styles && styles.front ? styles.front : '') + '>' + (styles && styles.backImage ? '' : '<span></span>') + '</div>' +
|
'<div class="h5p-front"' + (styles && styles.front ? styles.front : '') + '>' + (styles && styles.backImage ? '' : '<span></span>') + '</div>' +
|
||||||
'<div class="h5p-back"' + (styles && styles.back ? styles.back : '') + '>' +
|
'<div class="h5p-back"' + (styles && styles.back ? styles.back : '') + '>' +
|
||||||
'<img src="' + path + '" alt="Memory Card" style="width:' + width + ';height:' + height + '"/>' +
|
'<img src="' + path + '" alt="' + alt + '" style="width:' + width + ';height:' + height + '"/>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div></li>')
|
'</div></li>')
|
||||||
.appendTo($container)
|
.appendTo($container)
|
||||||
.children('.h5p-memory-card')
|
.on('keydown', function (event) {
|
||||||
|
switch (event.which) {
|
||||||
|
case 13: // Enter
|
||||||
|
case 32: // Space
|
||||||
|
self.flip();
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
case 39: // Right
|
||||||
|
case 40: // Down
|
||||||
|
// Move focus forward
|
||||||
|
self.trigger('next');
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
case 37: // Left
|
||||||
|
case 38: // Up
|
||||||
|
// Move focus back
|
||||||
|
self.trigger('prev');
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
case 35:
|
||||||
|
// Move to last card
|
||||||
|
self.trigger('last');
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
case 36:
|
||||||
|
// Move to first card
|
||||||
|
self.trigger('first');
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$wrapper.attr('aria-label', l10n.cardPrefix.replace('%num', $wrapper.index() + 1) + ' ' + l10n.cardUnturned);
|
||||||
|
$card = $wrapper.children('.h5p-memory-card')
|
||||||
.children('.h5p-front')
|
.children('.h5p-front')
|
||||||
.click(function () {
|
.click(function () {
|
||||||
self.flip();
|
self.flip();
|
||||||
|
@ -104,11 +179,47 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re-append to parent container
|
* Re-append to parent container.
|
||||||
*/
|
*/
|
||||||
self.reAppend = function () {
|
self.reAppend = function () {
|
||||||
var parent = $card[0].parentElement.parentElement;
|
var parent = $wrapper[0].parentElement;
|
||||||
parent.appendChild($card[0].parentElement);
|
parent.appendChild($wrapper[0]);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make the card accessible when tabbing
|
||||||
|
*/
|
||||||
|
self.makeTabbable = function () {
|
||||||
|
if ($wrapper) {
|
||||||
|
$wrapper.attr('tabindex', '0');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent tabbing to the card
|
||||||
|
*/
|
||||||
|
self.makeUntabbable = function () {
|
||||||
|
if ($wrapper) {
|
||||||
|
$wrapper.attr('tabindex', '-1');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make card tabbable and move focus to it
|
||||||
|
*/
|
||||||
|
self.setFocus = function () {
|
||||||
|
self.makeTabbable();
|
||||||
|
if ($wrapper) {
|
||||||
|
$wrapper.focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the card has been removed from the game, i.e. if has
|
||||||
|
* been matched.
|
||||||
|
*/
|
||||||
|
self.isRemoved = function () {
|
||||||
|
return removedState;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,8 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default": "#909090",
|
"default": "#909090"
|
||||||
"spectrum": {}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -80,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "الوصف",
|
"label": "الوصف",
|
||||||
"description": "نص قصير يتم عرضه مرة واحدة علي اثنين من البطاقات متساوية"
|
"description": "نص قصير يتم عرضه مرة واحدة علي اثنين من البطاقات متساوية"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -77,11 +82,31 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Try again button text",
|
"label": "Try again button text",
|
||||||
"default":"Try again?"
|
"default": "Reset"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "Opis",
|
"label": "Opis",
|
||||||
"description": "Kratak tekst koji će biti prikazan čim se pronađu dvije iste karte."
|
"description": "Kratak tekst koji će biti prikazan čim se pronađu dvije iste karte."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,28 @@
|
||||||
{
|
{
|
||||||
"widgets": [
|
"widgets": [
|
||||||
{
|
{
|
||||||
"label":"Default"
|
"label": "Standard"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"label":"Cards",
|
"label": "Kort",
|
||||||
"entity": "card",
|
"entity": "card",
|
||||||
"field": {
|
"field": {
|
||||||
"label":"Card",
|
"label": "Kort",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Image"
|
"label": "Billede"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Matching Image",
|
"label": "Matchende billede",
|
||||||
"description":"An optional image to match against instead of using two cards with the same image."
|
"description": "Valgfrit billede som match i stedet for at have to kort med det samme billede."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Beskrivelse",
|
||||||
|
"description": "Valgfri tekst, som popper op, når to matchende billeder er fundet."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
@ -26,62 +34,79 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Behavioural settings",
|
"label": "Indstillinger",
|
||||||
"description":"These options will let you control how the game behaves.",
|
"description": "Disse indstillinger giver dig mulighed for at bestemme, hvordan spillet fremstår.",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Position the cards in a square",
|
"label": "Placer kortene kvadratisk",
|
||||||
"description":"Will try to match the number of columns and rows when laying out the cards. Afterward, the cards will be scaled to fit the container."
|
"description": "Vil forsøge at matche antallet af kolonner og rækker, når kortene placeres. Efterfølgende vil størrelsen på kortene blive tilpasset."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Number of cards to use",
|
"label": "Antal kort i opgaven",
|
||||||
"description":"Setting this to a number greater than 2 will make the game pick random cards from the list of cards."
|
"description": "Vælges et større tal end 2, vælges kort tilfældigt fra listen af kort."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Add button for retrying when the game is over"
|
"label": "Tilføj knap for at prøve spillet igen, når spillet er afsluttet."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Look and feel",
|
"label": "Udseende",
|
||||||
"description":"Control the visuals of the game.",
|
"description": "Indstil spillets udseende.",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Theme Color",
|
"label": "Farvetema",
|
||||||
"description":"Choose a color to create a theme for your card game.",
|
"description": "Vælg en farve til bagsiden af dine kort.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Card Back",
|
"label": "Bagsidebillede",
|
||||||
"description":"Use a custom back for your cards."
|
"description": "Brug et billede som bagside på dine kort."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Localization",
|
"label": "Oversættelse",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Card turns text",
|
"label": "Tekst når kort vendes",
|
||||||
"default":"Card turns"
|
"default": "Kort vendes"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Time spent text",
|
"label": "Tekst for tidsforbrug",
|
||||||
"default":"Time spent"
|
"default": "Tidsforbrug"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Feedback text",
|
"label": "Feedback tekst",
|
||||||
"default":"Good work!"
|
"default": "Godt klaret!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Try again button text",
|
"label": "Prøv igen knaptekst",
|
||||||
"default":"Try again?"
|
"default": "Prøv igen?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Close button label",
|
"label": "Luk knaptekst",
|
||||||
"default":"Close"
|
"default": "Luk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"widgets": [
|
"widgets": [
|
||||||
{
|
{
|
||||||
"label":"Vorgaben"
|
"label": "Default"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"label": "Karten",
|
"label": "Karten",
|
||||||
|
@ -15,48 +15,53 @@
|
||||||
"label": "Bild"
|
"label": "Bild"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Passendes Bild",
|
"label": "Matching Image",
|
||||||
"description":"Ein optionales anderes Bild als Gegenstück statt zwei Karten mit dem selben Bild zu nutzen"
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Beschreibung",
|
"label": "Beschreibung",
|
||||||
"description": "Ein kurzer Text, der angezeigt wird, sobald zwei identische Karten gefunden werden."
|
"description": "Ein kurzer Text, der angezeigt wird, sobald zwei identische Karten gefunden werden."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Interaktionseinstellungen",
|
"label": "Behavioural settings",
|
||||||
"description":"Mit diesen Einstellungen kannst du das Verhalten des Spiels anpassen.",
|
"description": "These options will let you control how the game behaves.",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Positioniere die Karten in einem Quadrat.",
|
"label": "Position the cards in a square",
|
||||||
"description":"Es wird versucht, die Anzahl der Zeilen und Spalten passend zu den Karten einzustellen. Danach werden die Karten passend skaliert."
|
"description": "Will try to match the number of columns and rows when laying out the cards. Afterward, the cards will be scaled to fit the container."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Anzahl der zu nutzenden Karten",
|
"label": "Number of cards to use",
|
||||||
"description":"Wird hier eine Zahl größer als 2 eingestellt, werden zufällig Karten aus der Kartenliste gezogen."
|
"description": "Setting this to a number greater than 2 will make the game pick random cards from the list of cards."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Füge einen Button hinzu, um das Spiel noch einmal neu zu starten zu können, wenn es vorbei ist."
|
"label": "Add button for retrying when the game is over"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Design-Aspekte",
|
"label": "Look and feel",
|
||||||
"description":"Beeinflusse die Optik des Spiels",
|
"description": "Control the visuals of the game.",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label":"Themenfarbe",
|
"label": "Theme Color",
|
||||||
"description":"Wähle eine Farbe, um ein Theme für deine Karten zu erstellen.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Kartenrückseite",
|
"label": "Card Back",
|
||||||
"description":"Nutze eine individuelle Rückseite für deine Karten."
|
"description": "Use a custom back for your cards."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -76,12 +81,32 @@
|
||||||
"default": "Gute Arbeit!"
|
"default": "Gute Arbeit!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Text des Wiederholen-Buttons",
|
"label": "Try again button text",
|
||||||
"default":"Erneut versuchen?"
|
"default": "Reset"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Beschriftung des \"Abbrechen\"-Buttons",
|
"label": "Close button label",
|
||||||
"default":"Schließen"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "Descripción",
|
"label": "Descripción",
|
||||||
"description": "Un breve texto opcional que aparecerá una vez se encuentren las dos cartas coincidentes."
|
"description": "Un breve texto opcional que aparecerá una vez se encuentren las dos cartas coincidentes."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Color del tema",
|
"label": "Color del tema",
|
||||||
"description": "Elegir un color para crear un tema para su juego de cartas.",
|
"description": "Elegir un color para crear un tema para su juego de cartas.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Parte posterior de la tarjeta",
|
"label": "Parte posterior de la tarjeta",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Etiqueta del botón Cerrar",
|
"label": "Etiqueta del botón Cerrar",
|
||||||
"default": "Cerrar"
|
"default": "Cerrar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,85 +3,105 @@
|
||||||
{
|
{
|
||||||
"widgets": [
|
"widgets": [
|
||||||
{
|
{
|
||||||
"label":"Default"
|
"label":"Oletus"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"label":"Cards",
|
"label":"Kortit",
|
||||||
"entity":"card",
|
"entity":"kortti",
|
||||||
"field":{
|
"field":{
|
||||||
"label":"Card",
|
"label":"Kortti",
|
||||||
"fields":[
|
"fields":[
|
||||||
{
|
{
|
||||||
"label":"Image"
|
"label":"Kuva"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Matching Image",
|
"label":"Vastattava kuva",
|
||||||
"description":"An optional image to match against instead of using two cards with the same image."
|
"description":"Valinnainen kuva johon verrata korttia sen sijaan, että kortille etsitään toista samaa kuvaa pariksi."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Description",
|
"label":"Selite",
|
||||||
"description":"An optional short text that will pop up once the two matching cards are found."
|
"description":"Valinnainen lyhyt teksti, joka näytetään kun oikea pari on löydetty."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Behavioural settings",
|
"label":"Yleisasetukset",
|
||||||
"description":"These options will let you control how the game behaves.",
|
"description":"Näillä valinnoilla voit muokata pelin asetuksia.",
|
||||||
"fields":[
|
"fields":[
|
||||||
{
|
{
|
||||||
"label":"Position the cards in a square",
|
"label":"Aseta kortit säännöllisesti",
|
||||||
"description":"Will try to match the number of columns and rows when laying out the cards. Afterward, the cards will be scaled to fit the container."
|
"description":"Yrittää sovittaa kortit ruudukkomuotoon rivien sijaan."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Number of cards to use",
|
"label":"Korttien lukumäärä",
|
||||||
"description":"Setting this to a number greater than 2 will make the game pick random cards from the list of cards."
|
"description":"Kun lukumäärä on suurempi kuin kaksi, annettu määrä kortteja arvotaan kaikista korteista pelattavaksi."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Add button for retrying when the game is over"
|
"label":"Salli Yritä uudelleen -painike pelin päätyttyä"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Look and feel",
|
"label":"Ulkoasu",
|
||||||
"description":"Control the visuals of the game.",
|
"description":"Hallinnoi pelin ulkoasua.",
|
||||||
"fields":[
|
"fields":[
|
||||||
{
|
{
|
||||||
"label":"Theme Color",
|
"label":"Väriteema",
|
||||||
"description":"Choose a color to create a theme for your card game.",
|
"description":"Valitse väri luodaksesi teeman pelille.",
|
||||||
"default":"#909090",
|
"default":"#909090",
|
||||||
"spectrum":{
|
"spectrum":{
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Card Back",
|
"label":"Kortin kääntöpuoli",
|
||||||
"description":"Use a custom back for your cards."
|
"description":"Mukauta korttien kääntöpuoli."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Localization",
|
"label":"Tekstit",
|
||||||
"fields":[
|
"fields":[
|
||||||
{
|
{
|
||||||
"label":"Card turns text",
|
"label":"Kortteja käännetty",
|
||||||
"default":"Card turns"
|
"default":"Kortteja käännetty"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Time spent text",
|
"label":"Aikaa kulunut",
|
||||||
"default":"Time spent"
|
"default":"Aikaa kulunut"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Feedback text",
|
"label":"Palaute",
|
||||||
"default":"Good work!"
|
"default":"Hyvää työtä!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Try again button text",
|
"label":"Painikkeen Yritä uudelleen teksti",
|
||||||
"default":"Try again?"
|
"default":"Yritä uudelleen?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label":"Close button label",
|
"label":"Painikkeen Sulje teksti",
|
||||||
"default":"Close"
|
"default":"Sulje"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Pelin kuvaus",
|
||||||
|
"default": "Muistipeli. Löydä parit."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Peli päättynyt",
|
||||||
|
"default": "Kaikki parit löydetty."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Kortin yksilöllinen järjestysnumero",
|
||||||
|
"default": "Kortti %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Kääntämätön",
|
||||||
|
"default": "Kääntämätön."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Pari löytynyt",
|
||||||
|
"default": "Pari löydetty."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "Petit texte affiché quand deux cartes identiques sont trouvées."
|
"description": "Petit texte affiché quand deux cartes identiques sont trouvées."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -77,11 +82,31 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Try again button text",
|
"label": "Try again button text",
|
||||||
"default":"Try again?"
|
"default": "Reset"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "Descrizione",
|
"label": "Descrizione",
|
||||||
"description": "Breve testo visualizzato quando due carte uguali vengono trovate."
|
"description": "Breve testo visualizzato quando due carte uguali vengono trovate."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -77,11 +82,31 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Try again button text",
|
"label": "Try again button text",
|
||||||
"default":"Try again?"
|
"default": "Reset"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "説明",
|
"label": "説明",
|
||||||
"description": "一致する2つのカードが見つかるとポップアップするオプションの短文テキスト。"
|
"description": "一致する2つのカードが見つかるとポップアップするオプションの短文テキスト。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "テーマ色",
|
"label": "テーマ色",
|
||||||
"description": "カードゲームのテーマとなる色を選択してください。",
|
"description": "カードゲームのテーマとなる色を選択してください。",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "カード裏",
|
"label": "カード裏",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "閉じるボタンのテキスト",
|
"label": "閉じるボタンのテキスト",
|
||||||
"default": "閉じる"
|
"default": "閉じる"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
{
|
{
|
||||||
"label": "Beskrivelse",
|
"label": "Beskrivelse",
|
||||||
"description": "En valgfri kort tekst som spretter opp når kort-paret er funnet."
|
"description": "En valgfri kort tekst som spretter opp når kort-paret er funnet."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Temafarge",
|
"label": "Temafarge",
|
||||||
"description": "Velg en farge for å skape et tema over kortspillet ditt.",
|
"description": "Velg en farge for å skape et tema over kortspillet ditt.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Kortbaksiden",
|
"label": "Kortbaksiden",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Lukk knapp-merkelapp",
|
"label": "Lukk knapp-merkelapp",
|
||||||
"default": "Lukk"
|
"default": "Lukk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
"label": "Matching Image",
|
"label": "Matching Image",
|
||||||
"description": "An optional image to match against instead of using two cards with the same image."
|
"description": "An optional image to match against instead of using two cards with the same image."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Description",
|
||||||
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"description": "An optional short text that will pop up once the two matching cards are found."
|
"description": "An optional short text that will pop up once the two matching cards are found."
|
||||||
|
@ -49,10 +57,7 @@
|
||||||
{
|
{
|
||||||
"label": "Theme Color",
|
"label": "Theme Color",
|
||||||
"description": "Choose a color to create a theme for your card game.",
|
"description": "Choose a color to create a theme for your card game.",
|
||||||
"default":"#909090",
|
"default": "#909090"
|
||||||
"spectrum":{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Card Back",
|
"label": "Card Back",
|
||||||
|
@ -82,6 +87,26 @@
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "See how many cards you can remember!",
|
"description": "See how many cards you can remember!",
|
||||||
"majorVersion": 1,
|
"majorVersion": 1,
|
||||||
"minorVersion": 2,
|
"minorVersion": 2,
|
||||||
"patchVersion": 5,
|
"patchVersion": 8,
|
||||||
"runnable": 1,
|
"runnable": 1,
|
||||||
"author": "Joubel",
|
"author": "Joubel",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
.h5p-memory-game {
|
.h5p-memory-game {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
.h5p-memory-game .h5p-memory-hidden-read {
|
||||||
|
position: absolute;
|
||||||
|
top: -1px;
|
||||||
|
left: -1px;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
.h5p-memory-game > ul {
|
.h5p-memory-game > ul {
|
||||||
list-style: none !important;
|
list-style: none !important;
|
||||||
padding: 0.25em 0.5em !important;
|
padding: 0.25em 0.5em !important;
|
||||||
|
@ -186,9 +194,6 @@
|
||||||
margin: 0 1em 0 0;
|
margin: 0 1em 0 0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.h5p-memory-game .h5p-status > dt:after {
|
|
||||||
content: ":";
|
|
||||||
}
|
|
||||||
.h5p-memory-game .h5p-status > dd {
|
.h5p-memory-game .h5p-status > dd {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -307,3 +312,6 @@
|
||||||
transform: translate(-50%,-450%) scale(0) rotate(360deg);
|
transform: translate(-50%,-450%) scale(0) rotate(360deg);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
.h5p-memory-complete {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
183
memory-game.js
183
memory-game.js
|
@ -5,6 +5,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
var CARD_STD_SIZE = 116; // PX
|
var CARD_STD_SIZE = 116; // PX
|
||||||
var STD_FONT_SIZE = 16; // PX
|
var STD_FONT_SIZE = 16; // PX
|
||||||
var LIST_PADDING = 1; // EMs
|
var LIST_PADDING = 1; // EMs
|
||||||
|
var numInstances = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Memory Game Constructor
|
* Memory Game Constructor
|
||||||
|
@ -21,11 +22,28 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
// Initialize event inheritance
|
// Initialize event inheritance
|
||||||
EventDispatcher.call(self);
|
EventDispatcher.call(self);
|
||||||
|
|
||||||
var flipped, timer, counter, popup, $feedback, $wrapper, maxWidth, numCols;
|
var flipped, timer, counter, popup, $bottom, $taskComplete, $feedback, $wrapper, maxWidth, numCols;
|
||||||
var cards = [];
|
var cards = [];
|
||||||
var flipBacks = []; // Que of cards to be flipped back
|
var flipBacks = []; // Que of cards to be flipped back
|
||||||
var numFlipped = 0;
|
var numFlipped = 0;
|
||||||
var removed = 0;
|
var removed = 0;
|
||||||
|
numInstances++;
|
||||||
|
|
||||||
|
// Add defaults
|
||||||
|
parameters = $.extend(true, {
|
||||||
|
l10n: {
|
||||||
|
cardTurns: 'Card turns',
|
||||||
|
timeSpent: 'Time spent',
|
||||||
|
feedback: 'Good work!',
|
||||||
|
tryAgain: 'Reset',
|
||||||
|
closeLabel: 'Close',
|
||||||
|
label: 'Memory Game. Find the matching cards.',
|
||||||
|
done: 'All of the cards have been found.',
|
||||||
|
cardPrefix: 'Card %num: ',
|
||||||
|
cardUnturned: 'Unturned.',
|
||||||
|
cardMatched: 'Match found.'
|
||||||
|
}
|
||||||
|
}, parameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if these two cards belongs together.
|
* Check if these two cards belongs together.
|
||||||
|
@ -49,17 +67,17 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove them from the game.
|
|
||||||
card.remove();
|
|
||||||
mate.remove();
|
|
||||||
|
|
||||||
// Update counters
|
// Update counters
|
||||||
numFlipped -= 2;
|
numFlipped -= 2;
|
||||||
removed += 2;
|
removed += 2;
|
||||||
|
|
||||||
var isFinished = (removed === cards.length);
|
var isFinished = (removed === cards.length);
|
||||||
var desc = card.getDescription();
|
|
||||||
|
|
||||||
|
// Remove them from the game.
|
||||||
|
card.remove(!isFinished);
|
||||||
|
mate.remove();
|
||||||
|
|
||||||
|
var desc = card.getDescription();
|
||||||
if (desc !== undefined) {
|
if (desc !== undefined) {
|
||||||
// Pause timer and show desciption.
|
// Pause timer and show desciption.
|
||||||
timer.pause();
|
timer.pause();
|
||||||
|
@ -67,19 +85,25 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
if (card.hasTwoImages) {
|
if (card.hasTwoImages) {
|
||||||
imgs.push(mate.getImage());
|
imgs.push(mate.getImage());
|
||||||
}
|
}
|
||||||
popup.show(desc, imgs, cardStyles ? cardStyles.back : undefined, function () {
|
popup.show(desc, imgs, cardStyles ? cardStyles.back : undefined, function (refocus) {
|
||||||
if (isFinished) {
|
if (isFinished) {
|
||||||
// Game done
|
// Game done
|
||||||
|
card.makeUntabbable();
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Popup is closed, continue.
|
// Popup is closed, continue.
|
||||||
timer.play();
|
timer.play();
|
||||||
|
|
||||||
|
if (refocus) {
|
||||||
|
card.setFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (isFinished) {
|
else if (isFinished) {
|
||||||
// Game done
|
// Game done
|
||||||
|
card.makeUntabbable();
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -90,7 +114,9 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
*/
|
*/
|
||||||
var finished = function () {
|
var finished = function () {
|
||||||
timer.stop();
|
timer.stop();
|
||||||
$feedback.addClass('h5p-show');
|
$taskComplete.show();
|
||||||
|
$feedback.addClass('h5p-show'); // Announce
|
||||||
|
$bottom.focus();
|
||||||
|
|
||||||
// Create and trigger xAPI event 'completed'
|
// Create and trigger xAPI event 'completed'
|
||||||
var completedEvent = self.createXAPIEventTemplate('completed');
|
var completedEvent = self.createXAPIEventTemplate('completed');
|
||||||
|
@ -113,7 +139,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
});
|
});
|
||||||
retryButton.classList.add('h5p-memory-transin');
|
retryButton.classList.add('h5p-memory-transin');
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
// Remove class on nextTick to get transition effect
|
// Remove class on nextTick to get transition effectupd
|
||||||
retryButton.classList.remove('h5p-memory-transin');
|
retryButton.classList.remove('h5p-memory-transin');
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
|
@ -128,16 +154,14 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
* Shuffle the cards and restart the game!
|
* Shuffle the cards and restart the game!
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
var resetGame = function () {
|
var resetGame = function () {
|
||||||
|
|
||||||
// Reset cards
|
// Reset cards
|
||||||
removed = 0;
|
removed = 0;
|
||||||
for (var i = 0; i < cards.length; i++) {
|
|
||||||
cards[i].reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove feedback
|
// Remove feedback
|
||||||
$feedback[0].classList.remove('h5p-show');
|
$feedback[0].classList.remove('h5p-show');
|
||||||
|
$taskComplete.hide();
|
||||||
|
|
||||||
// Reset timer and counter
|
// Reset timer and counter
|
||||||
timer.reset();
|
timer.reset();
|
||||||
|
@ -151,11 +175,15 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
for (var i = 0; i < cards.length; i++) {
|
for (var i = 0; i < cards.length; i++) {
|
||||||
cards[i].reAppend();
|
cards[i].reAppend();
|
||||||
}
|
}
|
||||||
|
for (var j = 0; j < cards.length; j++) {
|
||||||
|
cards[j].reset();
|
||||||
|
}
|
||||||
|
|
||||||
// Scale new layout
|
// Scale new layout
|
||||||
$wrapper.children('ul').children('.h5p-row-break').removeClass('h5p-row-break');
|
$wrapper.children('ul').children('.h5p-row-break').removeClass('h5p-row-break');
|
||||||
maxWidth = -1;
|
maxWidth = -1;
|
||||||
self.trigger('resize');
|
self.trigger('resize');
|
||||||
|
cards[0].setFocus();
|
||||||
}, 600);
|
}, 600);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -169,7 +197,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
buttonElement.innerHTML = label;
|
buttonElement.innerHTML = label;
|
||||||
buttonElement.setAttribute('role', 'button');
|
buttonElement.setAttribute('role', 'button');
|
||||||
buttonElement.tabIndex = 0;
|
buttonElement.tabIndex = 0;
|
||||||
buttonElement.addEventListener('click', function (event) {
|
buttonElement.addEventListener('click', function () {
|
||||||
action.apply(buttonElement);
|
action.apply(buttonElement);
|
||||||
}, false);
|
}, false);
|
||||||
buttonElement.addEventListener('keypress', function (event) {
|
buttonElement.addEventListener('keypress', function (event) {
|
||||||
|
@ -190,6 +218,14 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
*/
|
*/
|
||||||
var addCard = function (card, mate) {
|
var addCard = function (card, mate) {
|
||||||
card.on('flip', function () {
|
card.on('flip', function () {
|
||||||
|
|
||||||
|
// Always return focus to the card last flipped
|
||||||
|
for (var i = 0; i < cards.length; i++) {
|
||||||
|
cards[i].makeUntabbable();
|
||||||
|
}
|
||||||
|
card.makeTabbable();
|
||||||
|
|
||||||
|
popup.close();
|
||||||
self.triggerXAPI('interacted');
|
self.triggerXAPI('interacted');
|
||||||
// Keep track of time spent
|
// Keep track of time spent
|
||||||
timer.play();
|
timer.play();
|
||||||
|
@ -197,6 +233,11 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
// Keep track of the number of flipped cards
|
// Keep track of the number of flipped cards
|
||||||
numFlipped++;
|
numFlipped++;
|
||||||
|
|
||||||
|
// Announce the card unless it's the last one and it's correct
|
||||||
|
var isMatched = (flipped === mate);
|
||||||
|
var isLast = ((removed + 2) === cards.length);
|
||||||
|
card.updateLabel(isMatched, !(isMatched && isLast));
|
||||||
|
|
||||||
if (flipped !== undefined) {
|
if (flipped !== undefined) {
|
||||||
var matie = flipped;
|
var matie = flipped;
|
||||||
// Reset the flipped card.
|
// Reset the flipped card.
|
||||||
|
@ -220,6 +261,72 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
counter.increment();
|
counter.increment();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create event handler for moving focus to the next or the previous
|
||||||
|
* card on the table.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {number} direction +1/-1
|
||||||
|
* @return {function}
|
||||||
|
*/
|
||||||
|
var createCardChangeFocusHandler = function (direction) {
|
||||||
|
return function () {
|
||||||
|
// Locate next card
|
||||||
|
for (var i = 0; i < cards.length; i++) {
|
||||||
|
if (cards[i] === card) {
|
||||||
|
// Found current card
|
||||||
|
|
||||||
|
var nextCard, fails = 0;
|
||||||
|
do {
|
||||||
|
fails++;
|
||||||
|
nextCard = cards[i + (direction * fails)];
|
||||||
|
if (!nextCard) {
|
||||||
|
return; // No more cards
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (nextCard.isRemoved());
|
||||||
|
|
||||||
|
card.makeUntabbable();
|
||||||
|
nextCard.setFocus();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Register handlers for moving focus to next and previous card
|
||||||
|
card.on('next', createCardChangeFocusHandler(1));
|
||||||
|
card.on('prev', createCardChangeFocusHandler(-1));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create event handler for moving focus to the first or the last card
|
||||||
|
* on the table.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {number} direction +1/-1
|
||||||
|
* @return {function}
|
||||||
|
*/
|
||||||
|
var createEndCardFocusHandler = function (direction) {
|
||||||
|
return function () {
|
||||||
|
var focusSet = false;
|
||||||
|
for (var i = 0; i < cards.length; i++) {
|
||||||
|
var j = (direction === -1 ? cards.length - (i + 1) : i);
|
||||||
|
if (!focusSet && !cards[j].isRemoved()) {
|
||||||
|
cards[j].setFocus();
|
||||||
|
focusSet = true;
|
||||||
|
}
|
||||||
|
else if (cards[j] === card) {
|
||||||
|
card.makeUntabbable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Register handlers for moving focus to first and last card
|
||||||
|
card.on('first', createEndCardFocusHandler(1));
|
||||||
|
card.on('last', createEndCardFocusHandler(-1));
|
||||||
|
|
||||||
cards.push(card);
|
cards.push(card);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -277,16 +384,16 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
var cardParams = cardsToUse[i];
|
var cardParams = cardsToUse[i];
|
||||||
if (MemoryGame.Card.isValid(cardParams)) {
|
if (MemoryGame.Card.isValid(cardParams)) {
|
||||||
// Create first card
|
// Create first card
|
||||||
var cardTwo, cardOne = new MemoryGame.Card(cardParams.image, id, cardParams.description, cardStyles);
|
var cardTwo, cardOne = new MemoryGame.Card(cardParams.image, id, cardParams.imageAlt, parameters.l10n, cardParams.description, cardStyles);
|
||||||
|
|
||||||
if (MemoryGame.Card.hasTwoImages(cardParams)) {
|
if (MemoryGame.Card.hasTwoImages(cardParams)) {
|
||||||
// Use matching image for card two
|
// Use matching image for card two
|
||||||
cardTwo = new MemoryGame.Card(cardParams.match, id, cardParams.description, cardStyles);
|
cardTwo = new MemoryGame.Card(cardParams.match, id, cardParams.matchAlt, parameters.l10n, cardParams.description, cardStyles);
|
||||||
cardOne.hasTwoImages = cardTwo.hasTwoImages = true;
|
cardOne.hasTwoImages = cardTwo.hasTwoImages = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Add two cards with the same image
|
// Add two cards with the same image
|
||||||
cardTwo = new MemoryGame.Card(cardParams.image, id, cardParams.description, cardStyles);
|
cardTwo = new MemoryGame.Card(cardParams.image, id, cardParams.imageAlt, parameters.l10n, cardParams.description, cardStyles);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add cards to card list for shuffeling
|
// Add cards to card list for shuffeling
|
||||||
|
@ -310,25 +417,45 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add cards to list
|
// Add cards to list
|
||||||
var $list = $('<ul/>');
|
var $list = $('<ul/>', {
|
||||||
|
role: 'application',
|
||||||
|
'aria-labelledby': 'h5p-intro-' + numInstances
|
||||||
|
});
|
||||||
for (var i = 0; i < cards.length; i++) {
|
for (var i = 0; i < cards.length; i++) {
|
||||||
cards[i].appendTo($list);
|
cards[i].appendTo($list);
|
||||||
}
|
}
|
||||||
|
cards[0].makeTabbable();
|
||||||
|
|
||||||
if ($list.children().length) {
|
if ($list.children().length) {
|
||||||
|
$('<div/>', {
|
||||||
|
id: 'h5p-intro-' + numInstances,
|
||||||
|
'class': 'h5p-memory-hidden-read',
|
||||||
|
html: parameters.l10n.label,
|
||||||
|
appendTo: $container
|
||||||
|
});
|
||||||
$list.appendTo($container);
|
$list.appendTo($container);
|
||||||
|
|
||||||
$feedback = $('<div class="h5p-feedback">' + parameters.l10n.feedback + '</div>').appendTo($container);
|
$bottom = $('<div/>', {
|
||||||
|
tabindex: '-1',
|
||||||
|
appendTo: $container
|
||||||
|
});
|
||||||
|
$taskComplete = $('<div/>', {
|
||||||
|
'class': 'h5p-memory-complete h5p-memory-hidden-read',
|
||||||
|
html: parameters.l10n.done,
|
||||||
|
appendTo: $bottom
|
||||||
|
});
|
||||||
|
|
||||||
|
$feedback = $('<div class="h5p-feedback">' + parameters.l10n.feedback + '</div>').appendTo($bottom);
|
||||||
|
|
||||||
// Add status bar
|
// Add status bar
|
||||||
var $status = $('<dl class="h5p-status">' +
|
var $status = $('<dl class="h5p-status">' +
|
||||||
'<dt>' + parameters.l10n.timeSpent + '</dt>' +
|
'<dt>' + parameters.l10n.timeSpent + ':</dt>' +
|
||||||
'<dd class="h5p-time-spent">0:00</dd>' +
|
'<dd class="h5p-time-spent"><time role="timer" datetime="PT0M0S">0:00</time><span class="h5p-memory-hidden-read">.</span></dd>' +
|
||||||
'<dt>' + parameters.l10n.cardTurns + '</dt>' +
|
'<dt>' + parameters.l10n.cardTurns + ':</dt>' +
|
||||||
'<dd class="h5p-card-turns">0</dd>' +
|
'<dd class="h5p-card-turns">0<span class="h5p-memory-hidden-read">.</span></dd>' +
|
||||||
'</dl>').appendTo($container);
|
'</dl>').appendTo($bottom);
|
||||||
|
|
||||||
timer = new MemoryGame.Timer($status.find('.h5p-time-spent')[0]);
|
timer = new MemoryGame.Timer($status.find('time')[0]);
|
||||||
counter = new MemoryGame.Counter($status.find('.h5p-card-turns'));
|
counter = new MemoryGame.Counter($status.find('.h5p-card-turns'));
|
||||||
popup = new MemoryGame.Popup($container, parameters.l10n);
|
popup = new MemoryGame.Popup($container, parameters.l10n);
|
||||||
|
|
||||||
|
@ -340,10 +467,10 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will try to scale the game so that it fits within its container.
|
* Will try to scale the game so that it fits within its container.
|
||||||
* Puts the cards into a grid layout to make it as square as possible –
|
* Puts the cards into a grid layout to make it as square as possible –
|
||||||
* which improves the playability on multiple devices.
|
* which improves the playability on multiple devices.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
var scaleGameSize = function () {
|
var scaleGameSize = function () {
|
||||||
|
|
||||||
|
@ -411,7 +538,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) {
|
||||||
/**
|
/**
|
||||||
* Determine color contrast level compared to white(#fff)
|
* Determine color contrast level compared to white(#fff)
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} color hex code
|
* @param {string} color hex code
|
||||||
* @return {number} From 1 to Infinity.
|
* @return {number} From 1 to Infinity.
|
||||||
*/
|
*/
|
||||||
|
|
16
popup.js
16
popup.js
|
@ -13,16 +13,16 @@
|
||||||
|
|
||||||
var closed;
|
var closed;
|
||||||
|
|
||||||
var $popup = $('<div class="h5p-memory-pop"><div class="h5p-memory-top"></div><div class="h5p-memory-desc"></div><div class="h5p-memory-close" role="button" tabindex="0" title="' + (l10n.closeLabel || 'Close') + '"></div></div>').appendTo($container);
|
var $popup = $('<div class="h5p-memory-pop" role="dialog"><div class="h5p-memory-top"></div><div class="h5p-memory-desc" tabindex="-1"></div><div class="h5p-memory-close" role="button" tabindex="0" title="' + (l10n.closeLabel || 'Close') + '"></div></div>').appendTo($container);
|
||||||
var $desc = $popup.find('.h5p-memory-desc');
|
var $desc = $popup.find('.h5p-memory-desc');
|
||||||
var $top = $popup.find('.h5p-memory-top');
|
var $top = $popup.find('.h5p-memory-top');
|
||||||
|
|
||||||
// Hook up the close button
|
// Hook up the close button
|
||||||
$popup.find('.h5p-memory-close').on('click', function () {
|
$popup.find('.h5p-memory-close').on('click', function () {
|
||||||
self.close();
|
self.close(true);
|
||||||
}).on('keypress', function (event) {
|
}).on('keypress', function (event) {
|
||||||
if (event.which === 13 || event.which === 32) {
|
if (event.which === 13 || event.which === 32) {
|
||||||
self.close();
|
self.close(true);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -41,22 +41,26 @@
|
||||||
$('<div class="h5p-memory-image"' + (styles ? styles : '') + '></div>').append(imgs[i]).appendTo($top);
|
$('<div class="h5p-memory-image"' + (styles ? styles : '') + '></div>').append(imgs[i]).appendTo($top);
|
||||||
}
|
}
|
||||||
$popup.show();
|
$popup.show();
|
||||||
|
$desc.focus();
|
||||||
closed = done;
|
closed = done;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the popup.
|
* Close the popup.
|
||||||
|
*
|
||||||
|
* @param {boolean} refocus Sets focus after closing the dialog
|
||||||
*/
|
*/
|
||||||
self.close = function () {
|
self.close = function (refocus) {
|
||||||
if (closed !== undefined) {
|
if (closed !== undefined) {
|
||||||
$popup.hide();
|
$popup.hide();
|
||||||
closed();
|
closed(refocus);
|
||||||
closed = undefined;
|
closed = undefined;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets popup size relative to the card size
|
* Sets popup size relative to the card size
|
||||||
|
*
|
||||||
* @param {number} fontSize
|
* @param {number} fontSize
|
||||||
*/
|
*/
|
||||||
self.setSize = function (fontSize) {
|
self.setSize = function (fontSize) {
|
||||||
|
|
|
@ -26,6 +26,13 @@
|
||||||
"importance": "high",
|
"importance": "high",
|
||||||
"ratio": 1
|
"ratio": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "imageAlt",
|
||||||
|
"type": "text",
|
||||||
|
"label": "Alternative text for Image",
|
||||||
|
"importance": "high",
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "match",
|
"name": "match",
|
||||||
"type": "image",
|
"type": "image",
|
||||||
|
@ -35,6 +42,14 @@
|
||||||
"description": "An optional image to match against instead of using two cards with the same image.",
|
"description": "An optional image to match against instead of using two cards with the same image.",
|
||||||
"ratio": 1
|
"ratio": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "matchAlt",
|
||||||
|
"type": "text",
|
||||||
|
"label": "Alternative text for Matching Image",
|
||||||
|
"importance": "low",
|
||||||
|
"optional": true,
|
||||||
|
"description": "Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "description",
|
"name": "description",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -146,7 +161,7 @@
|
||||||
"importance": "low",
|
"importance": "low",
|
||||||
"name": "tryAgain",
|
"name": "tryAgain",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"default": "Try again?"
|
"default": "Reset"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Close button label",
|
"label": "Close button label",
|
||||||
|
@ -154,6 +169,41 @@
|
||||||
"name": "closeLabel",
|
"name": "closeLabel",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"default": "Close"
|
"default": "Close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game label",
|
||||||
|
"importance": "low",
|
||||||
|
"name": "label",
|
||||||
|
"type": "text",
|
||||||
|
"default": "Memory Game. Find the matching cards."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Game finished label",
|
||||||
|
"importance": "low",
|
||||||
|
"name": "done",
|
||||||
|
"type": "text",
|
||||||
|
"default": "All of the cards have been found."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card indexing label",
|
||||||
|
"importance": "low",
|
||||||
|
"name": "cardPrefix",
|
||||||
|
"type": "text",
|
||||||
|
"default": "Card %num:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card unturned label",
|
||||||
|
"importance": "low",
|
||||||
|
"name": "cardUnturned",
|
||||||
|
"type": "text",
|
||||||
|
"default": "Unturned."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Card matched label",
|
||||||
|
"importance": "low",
|
||||||
|
"name": "cardMatched",
|
||||||
|
"type": "text",
|
||||||
|
"default": "Match found."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
5
timer.js
5
timer.js
|
@ -28,6 +28,11 @@
|
||||||
|
|
||||||
var minutes = Timer.extractTimeElement(time, 'minutes');
|
var minutes = Timer.extractTimeElement(time, 'minutes');
|
||||||
var seconds = Timer.extractTimeElement(time, 'seconds') % 60;
|
var seconds = Timer.extractTimeElement(time, 'seconds') % 60;
|
||||||
|
|
||||||
|
// Update duration attribute
|
||||||
|
element.setAttribute('datetime', 'PT' + minutes + 'M' + seconds + 'S');
|
||||||
|
|
||||||
|
// Add leading zero
|
||||||
if (seconds < 10) {
|
if (seconds < 10) {
|
||||||
seconds = '0' + seconds;
|
seconds = '0' + seconds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
var H5PUpgrades = H5PUpgrades || {};
|
var H5PUpgrades = H5PUpgrades || {};
|
||||||
|
|
||||||
H5PUpgrades['H5P.MemoryGame'] = (function ($) {
|
H5PUpgrades['H5P.MemoryGame'] = (function () {
|
||||||
return {
|
return {
|
||||||
1: {
|
1: {
|
||||||
/**
|
/**
|
||||||
|
@ -42,4 +42,4 @@ H5PUpgrades['H5P.MemoryGame'] = (function ($) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(H5P.jQuery);
|
})();
|
||||||
|
|
Loading…
Reference in New Issue