Added mouse module (love.mouse), updated doc/files.md

This commit is contained in:
rxi
2016-09-24 10:41:12 +01:00
parent 9a72cddbc9
commit dd44e8d1a0
6 changed files with 162 additions and 4 deletions

View File

@@ -15,6 +15,7 @@
#include "vga.h"
#include "luaobj.h"
#include "keyboard.h"
#include "mouse.h"
#include "image.h"
#include "palette.h"
@@ -46,6 +47,7 @@ int main(void) {
vga_init();
palette_init();
keyboard_init();
mouse_init();
/* Init lua */
L = luaL_newstate();
@@ -62,6 +64,8 @@ int main(void) {
"if love.load then love.load() end\n"
"love.timer.step()\n"
"while true do\n"
/* Update mouse and handle mouse events */
"love.mouse.update()\n"
/* Keyboard Events*/
"for _, e in ipairs(love.keyboard.getEvents()) do\n"
"if e.type == 'down' then\n"