Thanks for the help and quick response!
When drawing the menu text out, I did not use drawable:draw_region(). I used drawable:draw() instead. Also, I used text surfaces instead of surfaces.
Plus, the font I'm using is a bitmap font.
Here's a sample of my code that prints out the menu and the options:
-- Sample code printing out text for the menu.
function demo_screen:load_resources()
-- Code here...
self.menu_text = sol.text_surface.create({
font = font
})
-- More code here...
end
-- Drawing function for main demo.
-- This function is a sub-function for the main drawing function.
function demo_screen:on_draw_main_demo()
self.surface:clear()
-- Text for select title.
self.menu_text:set_text_key("demo_screen.select")
self.menu_text:draw(self.surface,
box_width / 2 - 24, self.box_position.y + 24)
-- Text for choices.
for i = 1, #self.choices-1 do
self.menu_text:set_text_key(self.choices[i])
self.menu_text:draw(self.surface, self.box_position.x + 24, (i-1) * 24 + 100)
end
-- More code here...
end
-- Main drawing function.
function demo_screen:on_draw(screen)
-- Code here...
self:on_draw_main_demo()
local width, height = screen:get_size()
self.surface:draw(screen, width / 2 - 160, height / 2 - 120)
end
I'll see if using drawable:draw_region() works.