diff options
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r-- | plugins/MirLua/src/Modules/m_options.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/options.cpp | 9 | ||||
-rw-r--r-- | plugins/MirLua/src/options.h | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/plugins/MirLua/src/Modules/m_options.cpp b/plugins/MirLua/src/Modules/m_options.cpp index f956885bb7..29383e89ad 100644 --- a/plugins/MirLua/src/Modules/m_options.cpp +++ b/plugins/MirLua/src/Modules/m_options.cpp @@ -14,7 +14,7 @@ public: { } - void OnInitDialog() override + bool OnInitDialog() override { if (m_onInitDialogRef) { @@ -22,9 +22,10 @@ public: lua_pushlightuserdata(L, m_hwnd); luaM_pcall(L, 1, 0); } + return true; } - void OnApply() override + bool OnApply() override { if (m_onApplyRef) { @@ -32,6 +33,7 @@ public: lua_pushlightuserdata(L, m_hwnd); luaM_pcall(L, 1, 0); } + return true; } void OnDestroy() override diff --git a/plugins/MirLua/src/options.cpp b/plugins/MirLua/src/options.cpp index f0a7827a93..f6b0f4cd51 100644 --- a/plugins/MirLua/src/options.cpp +++ b/plugins/MirLua/src/options.cpp @@ -17,8 +17,7 @@ CMLuaOptions::CMLuaOptions() static int ScriptStatusToIcon(ScriptStatus status)
{
- switch (status)
- {
+ switch (status) {
case ScriptStatus::None:
return -1;
case ScriptStatus::Loaded:
@@ -41,7 +40,7 @@ void CMLuaOptions::LoadScripts() }
}
-void CMLuaOptions::OnInitDialog()
+bool CMLuaOptions::OnInitDialog()
{
CDlgBase::OnInitDialog();
@@ -71,9 +70,10 @@ void CMLuaOptions::OnInitDialog() LoadScripts();
isScriptListInit = true;
+ return true;
}
-void CMLuaOptions::OnApply()
+bool CMLuaOptions::OnApply()
{
int count = m_scripts.GetItemCount();
for (int iItem = 0; iItem < count; iItem++) {
@@ -83,6 +83,7 @@ void CMLuaOptions::OnApply() else
script->Enable();
}
+ return true;
}
INT_PTR CMLuaOptions::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/MirLua/src/options.h b/plugins/MirLua/src/options.h index fa5c6dc823..9b540bc392 100644 --- a/plugins/MirLua/src/options.h +++ b/plugins/MirLua/src/options.h @@ -14,13 +14,13 @@ private: void LoadScripts();
protected:
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void OnScriptListClick(CCtrlListView::TEventInfo *evt);
void OnReload(CCtrlBase*);
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
public:
CMLuaOptions();
|