From 58a7339cb9ac1d70b37e4988e91fe51c43d15345 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 1 May 2018 21:03:38 +0200 Subject: [PATCH] Show the mouse wheel axis in the text sample This helps debugging these events generation. Closes https://github.com/wxWidgets/wxWidgets/pull/798 --- samples/text/text.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 7fde709462..f07a420db2 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -770,7 +770,9 @@ static wxString GetMouseEventDesc(const wxMouseEvent& ev) } else if ( ev.GetWheelRotation() ) { - return wxString::Format("Wheel rotation %+d", ev.GetWheelRotation()); + return wxString::Format("%s wheel rotation %+d", + ev.GetWheelAxis() == wxMOUSE_WHEEL_VERTICAL ? "Vertical" : "Horizontal", + ev.GetWheelRotation()); } else {