For a game written using Javascript, html5 you need to enter the player's name to save his progress. I have a dialog rendering function:

function drawDialog() { // функция отрисовки Π΄ΠΈΠ°Π»ΠΎΠ³Π° ctx.drawImage(backgroundImage, 0, 0 + iBgShiftY, 700, 700, 0, 0, 700, 700); drawGradient(); if (iDialogPage === 4) { ctx.fillText("Enter name:", ctx.canvas.width/2 - 150, ctx.canvas.height/2 - 110); //здСсь Π½ΡƒΠΆΠ½Π° Ρ„ΠΎΡ€ΠΌΠ° для Π²Π²ΠΎΠ΄Π° ΠΈΠΌΠ΅Π½ΠΈ ΠΈΠ³Ρ€ΠΎΠΊΠ° } } 

    1 answer 1

    On canvase it is better to draw only gameplay, everything else on html is better.