Skip to content

Commit

Permalink
fix wrong inital dims in game21
Browse files Browse the repository at this point in the history
  • Loading branch information
Bauumm committed Aug 9, 2023
1 parent 8d2a49d commit 528be34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions compat/game21/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ local message_font, go_sound, level_up_sound, restart_sound, select_sound
---@param level_id string
---@param level_options table
function public.start(pack_id, level_id, level_options)
-- update inital window dimensions when starting as well (for onInit/onLoad)
if not args.headless then
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
end
local difficulty_mult = level_options.difficulty_mult
if not difficulty_mult or type(difficulty_mult) ~= "number" then
error("Must specify a numeric difficulty mult when running a compat game")
Expand Down
2 changes: 1 addition & 1 deletion ui/screens/levelselect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local function make_level_element(pack, level, extra_info)
}, { direction = "column", style = { padding = 5 } }),
label:new(level.description, { font_size = 16, wrap = true }), -- future: use elements[2] to change this to only appear when selected
}, { direction = "column" }),
label:new(music, { font_size = 30, wrap = true }),
--flex:new({label:new(music, { font_size = 30, wrap = true })}, { align_items = "end", direction = "column" }),
}, { direction = "row" }),
style = { background_color = { 0, 0, 0, 0.7 }, border_color = { 0, 0, 0, 0.7 } },
selectable = true,
Expand Down

0 comments on commit 528be34

Please sign in to comment.