UI Changes
This commit is contained in:
@@ -446,7 +446,7 @@ $(function() {
|
|||||||
|
|
||||||
var barOffset;
|
var barOffset;
|
||||||
ctx.fillStyle = "white";
|
ctx.fillStyle = "white";
|
||||||
ctx.font = "24px Arial";
|
ctx.font = "24px Changa";
|
||||||
barOffset = ctx.measureText(user.name).width + 10;
|
barOffset = ctx.measureText(user.name).width + 10;
|
||||||
ctx.fillText(user.name, 5, CELL_WIDTH - 5);
|
ctx.fillText(user.name, 5, CELL_WIDTH - 5);
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ $(function() {
|
|||||||
|
|
||||||
//Percentage
|
//Percentage
|
||||||
ctx.fillStyle = "white";
|
ctx.fillStyle = "white";
|
||||||
ctx.font = "18px Arial";
|
ctx.font = "18px Changa";
|
||||||
ctx.fillText((lagPortion * 100).toFixed(3) + "%", 5 + barOffset, CELL_WIDTH - 5);
|
ctx.fillText((lagPortion * 100).toFixed(3) + "%", 5 + barOffset, CELL_WIDTH - 5);
|
||||||
|
|
||||||
if (user.dead && !showedDead)
|
if (user.dead && !showedDead)
|
||||||
|
@@ -417,7 +417,12 @@ Player.prototype.render = function(ctx, fade)
|
|||||||
//Render name
|
//Render name
|
||||||
ctx.fillStyle = this.shadowColor.deriveAlpha(fade).rgbString();
|
ctx.fillStyle = this.shadowColor.deriveAlpha(fade).rgbString();
|
||||||
ctx.textAlign = "center";
|
ctx.textAlign = "center";
|
||||||
ctx.fillText(this.name, this.posX + CELL_WIDTH / 2, this.posY - SHADOW_OFFSET * 2);
|
|
||||||
|
var yoff = -SHADOW_OFFSET * 2
|
||||||
|
if (this.row === 0)
|
||||||
|
yoff = SHADOW_OFFSET * 2 + CELL_WIDTH;
|
||||||
|
ctx.font = "18px Changa";
|
||||||
|
ctx.fillText(this.name, this.posX + CELL_WIDTH / 2, this.posY + yoff);
|
||||||
};
|
};
|
||||||
|
|
||||||
function move(data)
|
function move(data)
|
||||||
|
@@ -533,7 +533,7 @@ $(function() {
|
|||||||
|
|
||||||
var barOffset;
|
var barOffset;
|
||||||
ctx.fillStyle = "white";
|
ctx.fillStyle = "white";
|
||||||
ctx.font = "24px Arial";
|
ctx.font = "24px Changa";
|
||||||
barOffset = ctx.measureText(user.name).width + 10;
|
barOffset = ctx.measureText(user.name).width + 10;
|
||||||
ctx.fillText(user.name, 5, CELL_WIDTH - 5);
|
ctx.fillText(user.name, 5, CELL_WIDTH - 5);
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ $(function() {
|
|||||||
|
|
||||||
//Percentage
|
//Percentage
|
||||||
ctx.fillStyle = "white";
|
ctx.fillStyle = "white";
|
||||||
ctx.font = "18px Arial";
|
ctx.font = "18px Changa";
|
||||||
ctx.fillText((lagPortion * 100).toFixed(3) + "%", 5 + barOffset, CELL_WIDTH - 5);
|
ctx.fillText((lagPortion * 100).toFixed(3) + "%", 5 + barOffset, CELL_WIDTH - 5);
|
||||||
|
|
||||||
if (user.dead && !showedDead)
|
if (user.dead && !showedDead)
|
||||||
@@ -656,8 +656,6 @@ function defineInstanceMethods(thisobj, data /*, methods...*/)
|
|||||||
thisobj[arguments[i].name] = arguments[i].bind(this, data);
|
thisobj[arguments[i].name] = arguments[i].bind(this, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function defineAccessorProperties(thisobj, data /*, names...*/)
|
function defineAccessorProperties(thisobj, data /*, names...*/)
|
||||||
{
|
{
|
||||||
var descript = {};
|
var descript = {};
|
||||||
@@ -1060,7 +1058,12 @@ Player.prototype.render = function(ctx, fade)
|
|||||||
//Render name
|
//Render name
|
||||||
ctx.fillStyle = this.shadowColor.deriveAlpha(fade).rgbString();
|
ctx.fillStyle = this.shadowColor.deriveAlpha(fade).rgbString();
|
||||||
ctx.textAlign = "center";
|
ctx.textAlign = "center";
|
||||||
ctx.fillText(this.name, this.posX + CELL_WIDTH / 2, this.posY - SHADOW_OFFSET * 2);
|
|
||||||
|
var yoff = -SHADOW_OFFSET * 2
|
||||||
|
if (this.row === 0)
|
||||||
|
yoff = SHADOW_OFFSET * 2 + CELL_WIDTH;
|
||||||
|
ctx.font = "18px Changa";
|
||||||
|
ctx.fillText(this.name, this.posX + CELL_WIDTH / 2, this.posY + yoff);
|
||||||
};
|
};
|
||||||
|
|
||||||
function move(data)
|
function move(data)
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<head>
|
<head>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Changa:600" rel="stylesheet">
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||||
<script src="bundle.js"></script>
|
<script src="bundle.js"></script>
|
||||||
<style>
|
<style>
|
||||||
|
Reference in New Issue
Block a user