love_lynx.lua 585 B

12345678910111213141516171819
  1. return {
  2. simple_key = function (k) return k end,
  3. draw_background = function (menu, x, y, w, h)
  4. local background = menu.background
  5. -- Backup previous color.
  6. local r, g, b, a = love.graphics.getColor()
  7. love.graphics.setColor(background)
  8. love.graphics.rectangle("fill", x, y, w, h)
  9. love.graphics.setColor(r, g, b, a)
  10. end,
  11. draw_text = function (menu, text, color, x, y, w, align)
  12. local r, g, b, a = love.graphics.getColor()
  13. love.graphics.setColor(color)
  14. love.graphics.printf(text, x, y, w, align)
  15. love.graphics.setColor(r, g, b, a)
  16. end
  17. }