Update all remaining games to use text_scaled with scale=2
Updated games: - pong.lua: All text now uses text_scaled with scale=2 - air_hockey.lua: All text now uses text_scaled with scale=2 - asteroids.lua: All text now uses text_scaled with scale=2 - ball.lua: All text now uses text_scaled with scale=2 - breakout.lua: All text now uses text_scaled with scale=2 - counter.lua: All text now uses text_scaled with scale=2 - flappy_bird.lua: All text now uses text_scaled with scale=2 - lunar_lander.lua: All text now uses text_scaled with scale=2 - snake.lua: All text now uses text_scaled with scale=2 - tetris.lua: All text now uses text_scaled with scale=2 All 14 games now have consistent 2x text scaling for better readability.
This commit is contained in:
@@ -177,8 +177,8 @@ function draw()
|
||||
local state = game.vars.state
|
||||
|
||||
if state == STATE_MENU then
|
||||
renderer.text(game.width() / 2 - 20, game.height() / 2 - 30, "TETRIS", true)
|
||||
renderer.text(game.width() / 2 - 50, game.height() / 2, "Tap to Start", true)
|
||||
renderer.text_scaled(game.width(, 2) / 2 - 20, game.height() / 2 - 30, "TETRIS", true)
|
||||
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2, "Tap to Start", true)
|
||||
|
||||
elseif state == STATE_PLAYING or state == STATE_GAME_OVER then
|
||||
-- Draw grid
|
||||
@@ -203,12 +203,12 @@ function draw()
|
||||
end
|
||||
|
||||
-- Draw score
|
||||
renderer.text(game.width() - 50, 10, "Score: " .. tostring(game.vars.score), true)
|
||||
renderer.text(game.width() - 50, 20, "Lines: " .. tostring(game.vars.lines), true)
|
||||
renderer.text_scaled(game.width(, 2) - 50, 10, "Score: " .. tostring(game.vars.score), true)
|
||||
renderer.text_scaled(game.width(, 2) - 50, 20, "Lines: " .. tostring(game.vars.lines), true)
|
||||
|
||||
if state == STATE_GAME_OVER then
|
||||
renderer.text(game.width() / 2 - 40, game.height() / 2, "GAME OVER", true)
|
||||
renderer.text(game.width() / 2 - 50, game.height() / 2 + 20, "Tap to Menu", true)
|
||||
renderer.text_scaled(game.width(, 2) / 2 - 40, game.height() / 2, "GAME OVER", true)
|
||||
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2 + 20, "Tap to Menu", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user