aboutsummaryrefslogtreecommitdiffstats
path: root/label.lua
diff options
context:
space:
mode:
Diffstat (limited to 'label.lua')
-rw-r--r--label.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/label.lua b/label.lua
new file mode 100644
index 0000000..76f3c92
--- /dev/null
+++ b/label.lua
@@ -0,0 +1,9 @@
+local core = require((...):match("^(.+)%.[^%.]+") .. '.core')
+
+return function(text, x,y,w,h,align, draw)
+ local id = core.generateID()
+ w, h, align = w or 0, h or 0, align or 'left'
+ core.registerDraw(id, draw or core.style.Label, text,x,y,w,h,align)
+ return false
+end
+