summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/options.h
blob: 3e942e73a2624159cc3a4a93def2eeaa01a6204c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

class CMLuaOptionsMain : public CDlgBase
{
	CCtrlCheck m_popupOnError;
	CCtrlCheck m_popupOnObsolete;

	CCtrlListView m_scriptsList;
	CCtrlButton m_reload;

	void LoadScripts();

protected:
	bool OnInitDialog() override;
	bool OnApply() override;

	void OnScriptListClick(CCtrlListView::TEventInfo *evt);
	void OnReload(CCtrlBase*);

public:
	CMLuaOptionsMain();
};

/***********************************************/

class CMLuaEvaluateOptions : public CDlgBase
{
	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();
	~CMLuaEvaluateOptions();
};