diff --git a/ZFLoader/zfres/zf.lua b/ZFLoader/zfres/zf.lua deleted file mode 100644 index 07bb154..0000000 --- a/ZFLoader/zfres/zf.lua +++ /dev/null @@ -1,11 +0,0 @@ -local text = ZFUITextView() -ZFUIWindowShow(text, ZFUISizeParamWrapWrap()) -text:textSingleLine(zffalse) - -local hint = 'put a "zf.lua" to one of these paths and run again:\n' -local count = zfl_luaValue(ZFResExtPathList():count()) -for i=0,count-1 do - hint = hint .. '\n' .. ZFResExtPathList():get(i) -end -text:text(hint) - diff --git a/ZFLoader/zfsrc/main.cpp b/ZFLoader/zfsrc/main.cpp index e80aa4b..b5dc66e 100644 --- a/ZFLoader/zfsrc/main.cpp +++ b/ZFLoader/zfsrc/main.cpp @@ -13,8 +13,25 @@ ZFMAIN_ENTRY() { ZFResExtPathAdd(extResList[i]); } - ZFLuaExecute(ZFInputForRes("zf.lua")); - ZFLuaGC(); + ZFInput src = ZFInputForRes("zf.lua"); + if(src) { + zfLogTrim("redirect to %s", src.callbackId()); + ZFLuaExecute(src); + ZFLuaGC(); + return; + } + + zfobj w; + w->windowShow(); + zfobj text; + w->childAdd(text)->c_sizeWrap(); + text->textSingleLine(zffalse); + zfstring hint = "put a \"zf.lua\" to one of these paths and run again:\n"; + for(zfindex i = 0; i < ZFResExtPathList().count(); ++i) { + hint += "\n"; + ZFPathInfoToStringT(hint, ZFResExtPathList()[i]); + } + text->text(hint); } ZFMAIN_PARAM_DISPATCH(LuaRunner) {