Making a Menu with Gridview inside a subclass/scene

Hello, everyone!

I've been working on my first game and have hit a problem I can't quite solve with my limited lua experience.

I've used SquidGod's scene-manager technique to set up multiple scenes.

This means my main.lua file is basically empty and I have a number of separate .lua files that contain the code for each scene. The scene_manager allows me to transition between one scene and the next.

I've been trying to implement a menu inside of one of these scenes and I can't get it to display.

Here's my code - is there any way to get this gridview to appear within a class like this?

import "scripts/gameScene"

local pd <const> = playdate
local gfx <const> =


local gridview =, 32)


function scene03_menu:init()
    local backgroundImage ="images/menu")
        backgroundImage:draw(0, 0)

function scene03_menu:update()
    gridview:drawInRect(100, 70, 200, 100)
    if pd.buttonJustPressed(pd.kButtonA) then

I've found that using this gridview code in my main.lua file makes it display, but when used inside my class like this, it won't display at all. SquidGod does mention in his Scene Manager video that a drawback is 'no overlaid scenes' - is that referring to this exact problem?

Any suggestions? I'd like to be able to have a level select on the main menu, and a 'replay or select level' sort of table upon Game Over. Is there a better implementation of a level select I should consider instead?

Thanks for your help!