diff options
Diffstat (limited to 'plugins/MirLua/src/script.h')
-rw-r--r-- | plugins/MirLua/src/script.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/MirLua/src/script.h b/plugins/MirLua/src/script.h new file mode 100644 index 0000000000..8ff5b40600 --- /dev/null +++ b/plugins/MirLua/src/script.h @@ -0,0 +1,38 @@ +#pragma once
+
+class CMLuaScript : public CMLuaEnvironment
+{
+public:
+ enum Status
+ {
+ None,
+ Loaded,
+ Failed
+ };
+
+private:
+ Status status;
+ int unloadRef;
+
+ const wchar_t *fileName;
+ wchar_t filePath[MAX_PATH];
+
+ void Unload();
+
+public:
+ CMLuaScript(lua_State *L, const wchar_t *path);
+ CMLuaScript(const CMLuaScript &script);
+ ~CMLuaScript();
+
+ const wchar_t* GetFilePath() const;
+ const wchar_t* GetFileName() const;
+
+ bool IsEnabled();
+ void Enable();
+ void Disable();
+
+ Status GetStatus() const;
+
+ bool Load();
+ bool Reload();
+};
|