Use original graphics namespace
This commit is contained in:
@@ -38,8 +38,8 @@ function processItemActionRendering() {
|
||||
let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent));
|
||||
|
||||
let backgroundColour = toColour(0, 0, 0, 255);
|
||||
gta.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2)-1, itemActionDelayPosition.y-(itemActionDelaySize.y/2)-1], [itemActionDelaySize.x+2, itemActionDelaySize.y+2], backgroundColour, backgroundColour, backgroundColour, backgroundColour);
|
||||
gta.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2), itemActionDelayPosition.y-(itemActionDelaySize.y/2)-2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME);
|
||||
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2)-1, itemActionDelayPosition.y-(itemActionDelaySize.y/2)-1], [itemActionDelaySize.x+2, itemActionDelaySize.y+2], backgroundColour, backgroundColour, backgroundColour, backgroundColour);
|
||||
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2), itemActionDelayPosition.y-(itemActionDelaySize.y/2)-2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ function loadLogoImage() {
|
||||
function processLogoRendering() {
|
||||
if(renderLogo) {
|
||||
if(logoImage != null) {
|
||||
gta.drawRectangle(logoImage, logoPos, logoSize);
|
||||
graphics.drawRectangle(logoImage, logoPos, logoSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
|
||||
let hx = x-width/2;
|
||||
let hy = y-10/2;
|
||||
let colourB = toColour(0, 0, 0, Math.floor(255.0*alpha)); // Background colour (black)
|
||||
gta.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB);
|
||||
graphics.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB);
|
||||
let colour = toColour(Math.floor(255.0-(health*255.0)), Math.floor(health*255.0), 0, Math.floor(255.0*alpha)); // Health bar colour (varies, depending on health)
|
||||
gta.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour);
|
||||
graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour);
|
||||
}
|
||||
|
||||
// Armour Bar
|
||||
@@ -109,9 +109,9 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
|
||||
let hx = x-width/2;
|
||||
let hy = y-10/2;
|
||||
let colourB = toColour(255, 0, 0, 0); // Background colour (black)
|
||||
gta.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB);
|
||||
graphics.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB);
|
||||
let colour = toColour(255, 255, 255, 255); // Armour bar colour (white)
|
||||
gta.drawRectangle(null, [hx+2, hy+2], [(width-4)*armour, 10-6], colour, colour, colour, colour);
|
||||
graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*armour, 10-6], colour, colour, colour, colour);
|
||||
}
|
||||
|
||||
y -= 20;
|
||||
|
||||
Reference in New Issue
Block a user