Add score and fuel overlay
This commit is contained in:
parent
27c6a8bcd0
commit
4f8fd6e1af
13 changed files with 130 additions and 37 deletions
|
@ -7,7 +7,6 @@ export function render() {
|
|||
}
|
||||
|
||||
function renderElement(element) {
|
||||
//console.log(element.options);
|
||||
if (element.options.draw) {
|
||||
if (element.type === 'frame') renderFrame(element);
|
||||
if (element.type === 'image') renderImage(element);
|
||||
|
@ -93,7 +92,7 @@ function renderItemButton(element) {
|
|||
context.drawImage(element.image, ox, oy, dw, dh);
|
||||
}
|
||||
|
||||
if (element.quantity > 1) { // CHANGE TO 1
|
||||
if (element.quantity > 1) {
|
||||
context.textAlign = 'right';
|
||||
context.textBaseline = 'bottom';
|
||||
context.fillStyle = '#fff';
|
||||
|
@ -110,6 +109,6 @@ function renderEdit(element) {
|
|||
function renderInventory(element) {
|
||||
context.globalAlpha = 0.1;
|
||||
context.fillStyle = '#541';
|
||||
context.fillRect(...element.shape);
|
||||
context.fillRect(...element.parent.shape);
|
||||
context.globalAlpha = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue