Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix last commit, and set the position on mouse down instead of mouse up.
  • Loading branch information
RachelBryk committed Jun 25, 2013
1 parent b892d83 commit 5904ffb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Source/Core/DolphinWX/Src/TASInputDlg.cpp
Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Src/TASInputDlg.h
Expand Up @@ -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);
Expand Down

0 comments on commit 5904ffb

Please sign in to comment.