diff options
| author | Rachel Bryk <RachelBryk@gmail.com> | 2013-06-25 11:04:28 -0400 |
|---|---|---|
| committer | Rachel Bryk <RachelBryk@gmail.com> | 2013-06-25 11:04:28 -0400 |
| commit | 5904ffb21d2322d411e55fdb4ae853ff224f0de7 (patch) | |
| tree | f82350b1d15ff1c62b05caff1e90bb1bbece73c5 /Source/Core | |
| parent | b892d838ffa20ea6c12391a28d458831976140bc (diff) | |
Fix last commit, and set the position on mouse down instead of mouse up.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Src/TASInputDlg.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/TASInputDlg.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.cpp b/Source/Core/DolphinWX/Src/TASInputDlg.cpp index da12f26ff7..5bc24f3262 100644 --- a/Source/Core/DolphinWX/Src/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/Src/TASInputDlg.cpp @@ -41,8 +41,8 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxBoxSizer* const main_stick_box = new wxBoxSizer(wxVERTICAL); static_bitmap_main = new wxStaticBitmap(this, ID_MAIN_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); - static_bitmap_main->Bind(wxEVT_LEFT_UP, &TASInputDlg::OnMouseUpL, this); - static_bitmap_main->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseUpL, this); + static_bitmap_main->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::OnMouseDownL, this); + static_bitmap_main->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseDownL, this); static_bitmap_main->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_mainX_s->SetMinSize(wxSize(120,-1)); @@ -68,8 +68,8 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxBoxSizer* const c_stick_box = new wxBoxSizer(wxVERTICAL); static_bitmap_c = new wxStaticBitmap(this, ID_C_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); - static_bitmap_c->Bind(wxEVT_LEFT_UP, &TASInputDlg::OnMouseUpL, this); - static_bitmap_c->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseUpL, this); + static_bitmap_c->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::OnMouseDownL, this); + static_bitmap_c->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseDownL, this); static_bitmap_c->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_cX_s->SetMinSize(wxSize(120,-1)); @@ -754,9 +754,9 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event) } -void TASInputDlg::OnMouseUpL(wxMouseEvent& event) +void TASInputDlg::OnMouseDownL(wxMouseEvent& event) { - if (!event.LeftIsDown()) + if (event.GetEventType() == wxEVT_MOTION && !event.LeftIsDown()) return; wxSlider *sliderX,*sliderY; diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.h b/Source/Core/DolphinWX/Src/TASInputDlg.h index fa780081f0..28b3391463 100644 --- a/Source/Core/DolphinWX/Src/TASInputDlg.h +++ b/Source/Core/DolphinWX/Src/TASInputDlg.h @@ -24,7 +24,7 @@ class TASInputDlg : public wxDialog void OnCloseWindow(wxCloseEvent& event); void UpdateFromSliders(wxCommandEvent& event); void UpdateFromText(wxCommandEvent& event); - void OnMouseUpL(wxMouseEvent& event); + void OnMouseDownL(wxMouseEvent& event); void OnMouseUpR(wxMouseEvent& event); void ResetValues(); void GetValues(SPADStatus *PadStatus, int controllerID); |
