mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinWX: Implement scrolling in the code view and DSP disassembly view.
This commit is contained in:
@ -56,6 +56,7 @@ enum
|
||||
BEGIN_EVENT_TABLE(CCodeView, wxControl)
|
||||
EVT_ERASE_BACKGROUND(CCodeView::OnErase)
|
||||
EVT_PAINT(CCodeView::OnPaint)
|
||||
EVT_MOUSEWHEEL(CCodeView::OnScrollWheel)
|
||||
EVT_LEFT_DOWN(CCodeView::OnMouseDown)
|
||||
EVT_LEFT_UP(CCodeView::OnMouseUpL)
|
||||
EVT_MOTION(CCodeView::OnMouseMove)
|
||||
@ -114,6 +115,24 @@ void CCodeView::OnMouseDown(wxMouseEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void CCodeView::OnScrollWheel(wxMouseEvent& event)
|
||||
{
|
||||
const bool scroll_down = (event.GetWheelRotation() < 0);
|
||||
const int num_lines = event.GetLinesPerAction();
|
||||
|
||||
if (scroll_down)
|
||||
{
|
||||
curAddress += num_lines;
|
||||
}
|
||||
else
|
||||
{
|
||||
curAddress -= num_lines;
|
||||
}
|
||||
|
||||
Refresh();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void CCodeView::ToggleBreakpoint(u32 address)
|
||||
{
|
||||
debugger->ToggleBreakpoint(address);
|
||||
|
Reference in New Issue
Block a user