Implemented the mouse scale patch on native platform

This commit is contained in:
Иван Кузьменко 2025-09-01 18:45:53 +03:00
parent cf06bdce64
commit 01a000b9fa
4 changed files with 38 additions and 7 deletions

View file

@ -6,7 +6,7 @@ end
local platform = require "platform.platform"
local ttf
local bf
local bfi
local hamsterMouse
local function drawText(str, x, y)
local font = love.graphics.getFont()
@ -18,10 +18,14 @@ function love.load()
ttf = love.graphics.newFont()
bf = love.graphics.newImageFont("font.png",
" abcdefghijklmnopqrstuvwxyz" ..
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ..
"123456789.,!?-+/():;%&`'*#=[]\"")
bfi = love.graphics.newImage("font.png")
" abcdefghijklmnopqrstuvwxyz" ..
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ..
"123456789.,!?-+/():;%&`'*#=[]\"")
if love.system.getOS() == 'DOS' then
hamsterMouse = love.graphics.newImage("hammouse.gif")
else
hamsterMouse = love.graphics.newImage("hammouse.png")
end
end
function love.draw()
@ -34,7 +38,8 @@ function love.draw()
love.graphics.print(" abcdefghijklmnopqrstuvwxyz", 0, 110)
love.graphics.print("ABCDEFGHIJKLMNOPQRSTUVWXYZ0", 0, 130)
love.graphics.print("123456789.,!?-+/():;%&`'*#=[]\"", 0, 150)
love.graphics.draw(bfi, 0, 170)
love.graphics.draw(hamsterMouse, love.mouse.getX(), love.mouse.getY())
platform.drawEnd()
end