Add function arg to customize screen to slab coordinates.
Improve interoperability with screen resizing libraries by allowing
users to specify a function to transform screen coordinates into game
coordinates.
For example, with Ulydev/push you could do:
local function get_push_mouse(x,y)
local new_x,new_y = push:toGame(x,y)
if new_x and new_y then
return new_x,new_y
end
return x,y
end
local game_width, game_height, window_width, window_height = 800, 600, 1920, 1080
push:setupScreen(game_width, game_height, window_width, window_height)
Slab.Initialize(get_push_mouse, args)
Fix #20.
Add function arg to customize screen to slab coordinates.
Improve interoperability with screen resizing libraries by allowing users to specify a function to transform screen coordinates into game coordinates.
For example, with Ulydev/push you could do: