input dialog finished
This commit is contained in:
parent
e6124c4776
commit
12daf16282
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
|
|
||||||
wxBEGIN_EVENT_TABLE(InputConfigDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(InputConfigDialog, wxDialog)
|
||||||
EVT_COMMAND(1001, wxEVT_BUTTON, InputConfigDialog::OnDerp)
|
EVT_COMMAND(1001, wxEVT_BUTTON, InputConfigDialog::OnOk)
|
||||||
|
EVT_COMMAND(1002, wxEVT_BUTTON, InputConfigDialog::OnCancel)
|
||||||
|
|
||||||
EVT_TIMER(wxID_ANY, InputConfigDialog::OnPoll)
|
EVT_TIMER(wxID_ANY, InputConfigDialog::OnPoll)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
@ -141,22 +142,21 @@ InputConfigDialog::InputConfigDialog(wxWindow* parent)
|
||||||
p->SetSizer(sizer);
|
p->SetSizer(sizer);
|
||||||
vboxmain->Add(p, 0, wxALL&(~wxBOTTOM), 15);
|
vboxmain->Add(p, 0, wxALL&(~wxBOTTOM), 15);
|
||||||
}
|
}
|
||||||
wxButton* boobs;
|
|
||||||
{
|
{
|
||||||
wxPanel* p = new wxPanel(this);
|
wxPanel* p = new wxPanel(this);
|
||||||
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
//keycatcher = new wxButton(p, wxID_ANY, "pancake");
|
|
||||||
keycatcher = new wxPanel(p, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS);
|
keycatcher = new wxPanel(p, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS);
|
||||||
sizer->Add(keycatcher);
|
sizer->Add(keycatcher);
|
||||||
keycatcher->Show(false);
|
keycatcher->Show(false);
|
||||||
|
|
||||||
wxButton* derp = new wxButton(p, 1001, "derp");
|
wxButton* ok = new wxButton(p, 1001, "OK");
|
||||||
sizer->Add(derp);
|
sizer->Add(ok);
|
||||||
|
|
||||||
boobs = new wxButton(p, 1002, "boobs");
|
wxButton* cancel = new wxButton(p, 1002, "Cancel");
|
||||||
sizer->Add(3, 0);
|
sizer->Add(3, 0);
|
||||||
sizer->Add(boobs);
|
sizer->Add(cancel);
|
||||||
|
|
||||||
p->SetSizer(sizer);
|
p->SetSizer(sizer);
|
||||||
vboxmain->Add(p, 0, wxALL|wxALIGN_RIGHT, 15);
|
vboxmain->Add(p, 0, wxALL|wxALIGN_RIGHT, 15);
|
||||||
|
@ -186,9 +186,18 @@ InputConfigDialog::~InputConfigDialog()
|
||||||
SDL_DestroyWindow(sdlwin);
|
SDL_DestroyWindow(sdlwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputConfigDialog::OnDerp(wxCommandEvent& event)
|
void InputConfigDialog::OnOk(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
printf("OnDerp %d\n", event.GetId());
|
memcpy(Config::KeyMapping, keymapping, 12*sizeof(int));
|
||||||
|
memcpy(Config::JoyMapping, joymapping, 12*sizeof(int));
|
||||||
|
Config::Save();
|
||||||
|
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void InputConfigDialog::OnCancel(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// black magic going on there
|
// black magic going on there
|
||||||
|
@ -342,12 +351,6 @@ void InputConfigDialog::OnPoll(wxTimerEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputConfigDialog::OnKeyDown(wxKeyEvent& event)
|
|
||||||
{
|
|
||||||
printf("!!\n");
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
void InputConfigDialog::OnFancybuttonHover(wxMouseEvent& event)
|
void InputConfigDialog::OnFancybuttonHover(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
wxStaticText* btn = (wxStaticText*)this;
|
wxStaticText* btn = (wxStaticText*)this;
|
||||||
|
|
|
@ -35,7 +35,8 @@ public:
|
||||||
private:
|
private:
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
void OnDerp(wxCommandEvent& event);
|
void OnOk(wxCommandEvent& event);
|
||||||
|
void OnCancel(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnConfigureKey(wxMouseEvent& event);
|
void OnConfigureKey(wxMouseEvent& event);
|
||||||
void OnConfigureJoy(wxMouseEvent& event);
|
void OnConfigureJoy(wxMouseEvent& event);
|
||||||
|
|
Loading…
Reference in New Issue