From a094675a49cf4ab011ddb15fd1bc21632caceb9c Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Tue, 21 Feb 2012 14:52:30 +0100 Subject: Better require regexps for submodules --- core.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core.lua') diff --git a/core.lua b/core.lua index f57caa9..08cda79 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,6 @@ -- state local context = {maxid = 0} +local draw_items = {n = 0} local NO_WIDGET = function()end local function generateID() @@ -87,7 +88,6 @@ local function save_unpack(t, i) return t[i], save_unpack(t, i+1) end -local draw_items = {n = 0} local function registerDraw(id, f, ...) assert(type(f) == 'function' or (getmetatable(f) or {}).__call, 'Drawing function is not a callable type!') @@ -141,7 +141,7 @@ return { hasKeyFocus = hasKeyFocus, makeTabable = makeTabable, - style = require((...):match("^(.+)%.[^%.]+") .. '.style-default'), + style = require((...):match("(.-)[^%.]+$") .. '.style-default'), color = color, registerDraw = registerDraw, draw = draw, -- cgit v1.2.3-54-g00ecf