2020-05-19 09:14:40 +02:00
|
|
|
import { BaseHUDPart } from "../base_hud_part";
|
|
|
|
import { DrawParameters } from "../../../core/draw_parameters";
|
|
|
|
|
|
|
|
export class HUDWatermark extends BaseHUDPart {
|
|
|
|
createElements() {}
|
|
|
|
|
|
|
|
initialize() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param {DrawParameters} parameters
|
|
|
|
*/
|
|
|
|
drawOverlays(parameters) {
|
|
|
|
const w = this.root.gameWidth;
|
|
|
|
|
|
|
|
parameters.context.fillStyle = "#f77";
|
2020-05-21 18:03:57 +02:00
|
|
|
parameters.context.font = "bold " + this.root.app.getEffectiveUiScale() * 17 + "px GameFont";
|
2020-05-19 09:14:40 +02:00
|
|
|
parameters.context.textAlign = "center";
|
2020-05-21 20:16:33 +02:00
|
|
|
parameters.context.fillText("DEMO VERSION", w / 2, this.root.app.getEffectiveUiScale() * 35);
|
2020-05-19 09:14:40 +02:00
|
|
|
|
2020-05-21 18:03:57 +02:00
|
|
|
parameters.context.font = "bold " + this.root.app.getEffectiveUiScale() * 12 + "px GameFont";
|
|
|
|
parameters.context.textAlign = "center";
|
2020-05-21 20:16:33 +02:00
|
|
|
parameters.context.fillText(
|
|
|
|
"Please consider to buy the full version!",
|
|
|
|
w / 2,
|
|
|
|
this.root.app.getEffectiveUiScale() * 55
|
|
|
|
);
|
2020-05-21 18:03:57 +02:00
|
|
|
|
2020-05-19 09:14:40 +02:00
|
|
|
parameters.context.textAlign = "left";
|
|
|
|
}
|
|
|
|
}
|