fixe button offset
This commit is contained in:
parent
eb93dec6ba
commit
94a619b1f0
2 changed files with 2 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -265,7 +265,7 @@ function renderButton(
|
|||
ctx.font = "30px garamond";
|
||||
|
||||
// Center text based on its length
|
||||
const textXPosition = x + BUTTON_WIDTH * (0.5 - config.text.length * 0.025);
|
||||
const textXPosition = x + BUTTON_WIDTH * (0.25 - config.text.length * 0.025);
|
||||
const textYPosition = y + BUTTON_HEIGHT/2 * 1.3;
|
||||
|
||||
ctx.fillText(config.text, textXPosition, textYPosition);
|
||||
|
|
|
|||
Loading…
Reference in a new issue