mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Fix last commit, and set the position on mouse down instead of mouse up.
This commit is contained in:
parent
b892d838ff
commit
5904ffb21d
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user