[Debugger] Add tooltips to scripts window
This commit is contained in:
parent
033d9b8327
commit
7ca05cde8a
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
CDebugScripts::CDebugScripts(CDebuggerUI* debugger) :
|
CDebugScripts::CDebugScripts(CDebuggerUI* debugger) :
|
||||||
CDebugDialog<CDebugScripts>(debugger),
|
CDebugDialog<CDebugScripts>(debugger),
|
||||||
|
CToolTipDialog<CDebugScripts>(),
|
||||||
m_SelectedScriptName(NULL),
|
m_SelectedScriptName(NULL),
|
||||||
m_hQuitScriptDirWatchEvent(NULL),
|
m_hQuitScriptDirWatchEvent(NULL),
|
||||||
m_hScriptDirWatchThread(NULL)
|
m_hScriptDirWatchThread(NULL)
|
||||||
|
@ -33,6 +34,7 @@ LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l
|
||||||
{
|
{
|
||||||
DlgResize_Init(false, true);
|
DlgResize_Init(false, true);
|
||||||
DlgSavePos_Init(DebuggerUI_ScriptsPos);
|
DlgSavePos_Init(DebuggerUI_ScriptsPos);
|
||||||
|
DlgToolTip_Init();
|
||||||
|
|
||||||
HFONT monoFont = CreateFont(-11, 0, 0, 0,
|
HFONT monoFont = CreateFont(-11, 0, 0, 0,
|
||||||
FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
||||||
|
@ -446,6 +448,11 @@ void CDebugScripts::EvaluateInSelectedInstance(const char* code)
|
||||||
|
|
||||||
void CDebugScripts::RunSelected()
|
void CDebugScripts::RunSelected()
|
||||||
{
|
{
|
||||||
|
if (m_SelectedScriptName == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName);
|
INSTANCE_STATE state = m_Debugger->ScriptSystem()->GetInstanceState(m_SelectedScriptName);
|
||||||
|
|
||||||
if (state == STATE_INVALID || state == STATE_STOPPED)
|
if (state == STATE_INVALID || state == STATE_STOPPED)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "DebuggerUI.h"
|
#include "DebuggerUI.h"
|
||||||
#include "ScriptSystem.h"
|
#include "ScriptSystem.h"
|
||||||
|
#include <Project64/UserInterface/WTLControls/TooltipDialog.h>
|
||||||
|
|
||||||
class CScriptList : public CListViewCtrl
|
class CScriptList : public CListViewCtrl
|
||||||
{
|
{
|
||||||
|
@ -78,8 +79,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDebugScripts :
|
class CDebugScripts :
|
||||||
public CDebugDialog < CDebugScripts >,
|
public CDebugDialog<CDebugScripts>,
|
||||||
public CDialogResize<CDebugScripts>
|
public CDialogResize<CDebugScripts>,
|
||||||
|
public CToolTipDialog<CDebugScripts>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
|
@ -161,4 +163,12 @@ public:
|
||||||
DLGRESIZE_CONTROL(IDC_SCRIPTDIR_BTN, DLSZ_MOVE_Y)
|
DLGRESIZE_CONTROL(IDC_SCRIPTDIR_BTN, DLSZ_MOVE_Y)
|
||||||
DLGRESIZE_CONTROL(IDC_STATUSBAR, DLSZ_SIZE_X | DLSZ_MOVE_Y)
|
DLGRESIZE_CONTROL(IDC_STATUSBAR, DLSZ_SIZE_X | DLSZ_MOVE_Y)
|
||||||
END_DLGRESIZE_MAP()
|
END_DLGRESIZE_MAP()
|
||||||
|
|
||||||
|
BEGIN_TOOLTIP_MAP()
|
||||||
|
TOOLTIP(IDC_CLEAR_BTN, "Clear console output")
|
||||||
|
TOOLTIP(IDC_COPY_BTN, "Copy console output to the clipboard")
|
||||||
|
TOOLTIP(IDC_RUN_BTN, "Run selected script")
|
||||||
|
TOOLTIP(IDC_STOP_BTN, "Stop selected script")
|
||||||
|
TOOLTIP(IDC_SCRIPTDIR_BTN, "Open scripts directory in file explorer")
|
||||||
|
END_TOOLTIP_MAP()
|
||||||
};
|
};
|
||||||
|
|
|
@ -836,8 +836,8 @@ BEGIN
|
||||||
GROUPBOX "Output",IDC_OUTPUT_GRP,129,5,285,177,0,WS_EX_TRANSPARENT
|
GROUPBOX "Output",IDC_OUTPUT_GRP,129,5,285,177,0,WS_EX_TRANSPARENT
|
||||||
CONTROL "",IDC_STATUSBAR,"msctls_statusbar32",WS_TABSTOP,0,205,420,11
|
CONTROL "",IDC_STATUSBAR,"msctls_statusbar32",WS_TABSTOP,0,205,420,11
|
||||||
PUSHBUTTON "...",IDC_SCRIPTDIR_BTN,13,165,21,13
|
PUSHBUTTON "...",IDC_SCRIPTDIR_BTN,13,165,21,13
|
||||||
PUSHBUTTON "Run",IDC_RUN_BTN,43,165,37,13
|
PUSHBUTTON "Run",IDC_RUN_BTN,43,165,37,13,WS_DISABLED
|
||||||
PUSHBUTTON "Stop",IDC_STOP_BTN,83,165,37,13
|
PUSHBUTTON "Stop",IDC_STOP_BTN,83,165,37,13,WS_DISABLED
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_Debugger_RegPI DIALOGEX 0, 0, 190, 210
|
IDD_Debugger_RegPI DIALOGEX 0, 0, 190, 210
|
||||||
|
|
Loading…
Reference in New Issue