summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/options.h
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-07-13 23:57:25 +0300
committeraunsane <aunsane@gmail.com>2018-07-15 15:03:47 +0300
commitce719a1725988bded5566a5d7f596b1ba42cfa91 (patch)
treeee5a96fa51444ed509edb111a0ed49eabda834f2 /plugins/MirLua/src/options.h
parent40198c29b0f5e7f14f73a3e0a62541ac918612a8 (diff)
MirLua: add Evaluate option page to test scripts
Diffstat (limited to 'plugins/MirLua/src/options.h')
-rw-r--r--plugins/MirLua/src/options.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/plugins/MirLua/src/options.h b/plugins/MirLua/src/options.h
index 9b540bc392..879f06b55a 100644
--- a/plugins/MirLua/src/options.h
+++ b/plugins/MirLua/src/options.h
@@ -1,14 +1,16 @@
#pragma once
-class CMLuaOptions : public CDlgBase
+class CMLuaOptionsMain : public CDlgBase
{
private:
+ CMPlugin &m_plugin;
+
bool isScriptListInit;
CCtrlCheck m_popupOnError;
CCtrlCheck m_popupOnObsolete;
- CCtrlListView m_scripts;
+ CCtrlListView m_scriptsList;
CCtrlButton m_reload;
void LoadScripts();
@@ -23,5 +25,31 @@ protected:
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
public:
- CMLuaOptions();
+ CMLuaOptionsMain(CMPlugin &plugin);
+};
+
+/***********************************************/
+
+class CMLuaEvaluateOptions : public CDlgBase
+{
+private:
+ lua_State *L = nullptr;
+ int threadRef = 0;
+
+ CCtrlEdit m_script;
+ CCtrlEdit m_result;
+
+ CCtrlCheck m_autoEval;
+ CCtrlButton m_evaluate;
+
+protected:
+ bool OnInitDialog() override;
+ bool OnApply() override;
+
+ void OnAutoEvalChange(CCtrlBase*);
+ void OnEvaluate(CCtrlBase*);
+
+public:
+ CMLuaEvaluateOptions(CMPlugin &plugin);
+ ~CMLuaEvaluateOptions();
};