Quick script toggling on double click
This commit is contained in:
parent
617db96317
commit
e15e59052c
|
@ -196,7 +196,7 @@ LRESULT CDebugScripts::OnScriptListDblClicked(NMHDR* pNMHDR)
|
|||
|
||||
m_ScriptList.SelectItem(nItem);
|
||||
|
||||
RunSelected();
|
||||
ToggleSelected();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -406,3 +406,17 @@ void CDebugScripts::StopSelected()
|
|||
|
||||
//m_Debugger->Debug_RefreshScriptsWindow();
|
||||
}
|
||||
|
||||
void CDebugScripts::ToggleSelected()
|
||||
{
|
||||
INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName);
|
||||
|
||||
if (state == STATE_INVALID || state == STATE_STOPPED)
|
||||
{
|
||||
RunSelected();
|
||||
}
|
||||
else
|
||||
{
|
||||
StopSelected();
|
||||
}
|
||||
}
|
|
@ -107,6 +107,7 @@ public:
|
|||
void EvaluateInSelectedInstance(char* code);
|
||||
void RunSelected();
|
||||
void StopSelected();
|
||||
void ToggleSelected();
|
||||
|
||||
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnDestroy(void)
|
||||
|
|
Loading…
Reference in New Issue