From e8c0a474ef001caaede8e955d1f99f3d6c542e8d Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 6 Sep 2018 20:35:03 +0800 Subject: *update --- JGUI/JGUI.lua | 36 ++++++++++++++++++++++++++++++++++++ JGUI/main.lua | 19 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 JGUI/JGUI.lua create mode 100644 JGUI/main.lua (limited to 'JGUI') diff --git a/JGUI/JGUI.lua b/JGUI/JGUI.lua new file mode 100644 index 0000000..6f82896 --- /dev/null +++ b/JGUI/JGUI.lua @@ -0,0 +1,36 @@ + +-- panel +local JGUI = {} + +local Widget = { + -- common properties + name, -- name + x, y, width, height, -- boundary + swallow, -- swallow event or not by default + -- event callbacks + onClick, -- clicked callback + onHover, -- hover callback + -- common functions + onEvent, +} +function Widget.onEvent(clicked, ) + +end + +local Panel = { + widgets = {}, +} + + +------------------------------------ +-- +------------------------------------ +JGUI.newButton = function() + +end + +JGUI.newPanel = function() + +end + + diff --git a/JGUI/main.lua b/JGUI/main.lua new file mode 100644 index 0000000..93fea92 --- /dev/null +++ b/JGUI/main.lua @@ -0,0 +1,19 @@ +local JGUI = require("JGUI") + +function jin.core.onLoad() + +end + +function jin.core.onEvent(e) + if e.type == "quit" then + jin.core.stop() + end +end + +function jin.core.onUpdate() + +end + +function jin.core.onDraw() + +end -- cgit v1.1-26-g67d0