整理Zframework代码
给所有模块进行更合理的分类 解除部分模块之间的依赖 修复image和bgm模块两个一般不会触发的小问题 close #209
This commit is contained in:
@@ -3,44 +3,63 @@ EDITING=""
|
||||
LOADED=false
|
||||
ERRDATA={}
|
||||
|
||||
SCR= require'Zframework.screen'
|
||||
--Pure lua modules (basic)
|
||||
COLOR= require'Zframework.color'
|
||||
SCN= require'Zframework.scene'
|
||||
WS= require'Zframework.websocket'
|
||||
TABLE= require'Zframework.tableExtend'
|
||||
STRING= require'Zframework.stringExtend'
|
||||
PROFILE=require'Zframework.profile'
|
||||
JSON= require'Zframework.json'
|
||||
do--Add pcall & MES for JSON lib
|
||||
local encode,decode=JSON.encode,JSON.decode
|
||||
JSON.encode=function(val)
|
||||
local a,b=pcall(encode,val)
|
||||
if a then
|
||||
return b
|
||||
elseif MES then
|
||||
MES.traceback()
|
||||
end
|
||||
end
|
||||
JSON.decode=function(str)
|
||||
local a,b=pcall(decode,str)
|
||||
if a then
|
||||
return b
|
||||
elseif MES then
|
||||
MES.traceback()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require'Zframework.setFont'
|
||||
--Pure lua modules (complex)
|
||||
LOADLIB=require'Zframework.loadLib'
|
||||
TASK= require'Zframework.task'
|
||||
WS= require'Zframework.websocket'
|
||||
LANG= require'Zframework.languages'
|
||||
THEME= require'Zframework.theme'
|
||||
|
||||
--Love-based modules (basic)
|
||||
FILE= require'Zframework.file'
|
||||
WHEELMOV=require'Zframework.wheelScroll'
|
||||
SCR= require'Zframework.screen'
|
||||
SCN= require'Zframework.scene'
|
||||
LIGHT= require'Zframework.light'
|
||||
|
||||
--Love-based modules (complex)
|
||||
GC=require'Zframework.gcExtend'
|
||||
mStr=GC.str
|
||||
mText=GC.simpX
|
||||
mDraw=GC.draw
|
||||
|
||||
LOADLIB=require'Zframework.loadLib'
|
||||
WHEELMOV=require'Zframework.wheelScroll'
|
||||
|
||||
JSON= require'Zframework.json'
|
||||
TABLE= require'Zframework.tableExtend'
|
||||
STRING= require'Zframework.stringExtend'
|
||||
|
||||
VIB= require'Zframework.vibrate'
|
||||
SFX= require'Zframework.sfx'
|
||||
|
||||
LIGHT= require'Zframework.light'
|
||||
BG= require'Zframework.background'
|
||||
WIDGET= require'Zframework.widget'
|
||||
require'Zframework.setFont'
|
||||
TEXT= require'Zframework.text'
|
||||
SYSFX= require'Zframework.sysFX'
|
||||
MES= require'Zframework.message'
|
||||
|
||||
BG= require'Zframework.background'
|
||||
WIDGET= require'Zframework.widget'
|
||||
VIB= require'Zframework.vibrate'
|
||||
SFX= require'Zframework.sfx'
|
||||
IMG= require'Zframework.image'
|
||||
BGM= require'Zframework.bgm'
|
||||
VOC= require'Zframework.voice'
|
||||
|
||||
LANG= require'Zframework.languages'
|
||||
TASK= require'Zframework.task'
|
||||
FILE= require'Zframework.file'
|
||||
PROFILE=require'Zframework.profile'
|
||||
THEME= require'Zframework.theme'
|
||||
|
||||
local ms,kb=love.mouse,love.keyboard
|
||||
|
||||
local gc=love.graphics
|
||||
|
||||
Reference in New Issue
Block a user