let path = dragonblocks.textures[name];
- return path ? "url(" + path + ")" : name;
+ return path ? "left top/cover url(" + path + ")" : name;
};
dragonblocks.resolveTextures = elem => {
};
dragonblocks.getSound = name => {
- if(! name)
+ if (! name)
return "";
return dragonblocks.sounds[name] || name;
arrow.style.height = dragonblocks.settings.inventory.scale + "px";
arrow.style[dir] = "0px";
arrow.style.background = dragonblocks.getTexture("arrow.png");
- arrow.style.backgroundSize = "cover";
arrow.style.cursor = "pointer";
if (dir == "right")
moveField.style.width = this.big ? "50px": "30px";
moveField.style.height = this.big ? "50px": "30px";
moveField.style.background = dragonblocks.getTexture("move.png");
- moveField.style.backgroundSize = "cover"
moveField.style.cursor = "move";
let self = this;
closeField.style.width = this.big ? "50px": "30px";
closeField.style.height = this.big ? "50px": "30px";
closeField.style.background = dragonblocks.getTexture("close.png");
- closeField.style.backgroundSize = "cover";
closeField.style.cursor = "pointer";
let self = this;
slotDisplay.style.background = itemstack.item && dragonblocks.getTexture(itemstack.toItem().texture);
if (! slotDisplay.style.backgroundColor || slotDisplay.style.backgroundColor == "initial")
slotDisplay.style.backgroundColor = "rgba(0, 0, 0, 0.3)";
- slotDisplay.style.backgroundSize = "cover";
slotCountDisplay.innerHTML = (itemstack.count <= 1) ? "" : itemstack.count;
display.title = item.desc;
display.style.background = dragonblocks.getTexture(item.texture);
- display.style.backgroundSize = "cover";
if (this.count > 1)
countDisplay.innerHTML = this.count;
arrow.style.position = "absolute";
arrow.style[dir] = "3px";
arrow.style.background = dragonblocks.getTexture("arrow.png");
- arrow.style.backgroundSize = "cover";
arrow.style.cursor = "pointer";
if (dir == "right")
if (mapNodeDef) {
node.style.background = dragonblocks.getTexture(mapNodeDef.texture);
- node.style.backgroundSize = "cover";
node.style.zIndex = mapNodeDef.zIndex || "1";
} else {
node.style.background = "black";
this.tmp.crackDisplay = this.map.entityContainer.appendChild(document.createElement("div"));
this.tmp.crackDisplay.style.position = "absolute";
this.tmp.crackDisplay.style.visibility = "hidden";
- this.tmp.crackDisplay.style.backgroundSize = "cover";
this.tmp.crackDisplay.style.height = dragonblocks.settings.mapDisplay.scale + "px";
this.tmp.crackDisplay.style.width = dragonblocks.settings.mapDisplay.scale + "px";
this.tmp.crackDisplay.style.boxShadow = "0 0 0 1px black inset";
nodeDef.playSound("dig");
this.tmp.crackDisplay.style.background = dragonblocks.getTexture("crack" + Math.floor(node.meta.causedDamage / nodeDef.hardness * 5) + ".png");
- this.tmp.crackDisplay.style.backgroundSize = "cover";
this.tmp.crackDisplay.style.zIndex = nodeDef.zIndex || "1";
this.tmp.digTimeout = setTimeout(_ => {
skinDisplay.style.width = parseInt(dragonblocks.settings.map.scale) + "px";
skinDisplay.style.height = parseInt(dragonblocks.settings.map.scale * 2) + "px";
skinDisplay.style.background = dragonblocks.getTexture(def.texture);
- skinDisplay.style.backgroundSize = "cover";
skinDisplay.title = def.name + (def.desc ? "\n" + def.desc : "");
if (dragonblocks.player.skin == def.name)
updateTexture()
{
this.tmp.display.style.background = dragonblocks.getTexture(this.texture);
- this.tmp.display.style.backgroundSize = "cover";
}
teleport(x, y)