mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Try on a nicer mapping workaround.
This commit is contained in:
1 parent
26c02478af
commit
a0b904c7e8
1 file changed
+11
-2
@@ -47,6 +47,7 @@ private:
|
||||
void Refresh();
|
||||
|
||||
UI::EventReturn OnAdd(UI::EventParams ¶ms);
|
||||
UI::EventReturn OnAddMouse(UI::EventParams ¶ms);
|
||||
UI::EventReturn OnDelete(UI::EventParams ¶ms);
|
||||
UI::EventReturn OnReplace(UI::EventParams ¶ms);
|
||||
UI::EventReturn OnReplaceAll(UI::EventParams ¶ms);
|
||||
@@ -119,6 +120,10 @@ void ControlMapper::Refresh() {
|
||||
|
||||
Choice *p = root->Add(new Choice(" + ", new LayoutParams(WRAP_CONTENT, itemH)));
|
||||
p->OnClick.Handle(this, &ControlMapper::OnAdd);
|
||||
if (g_Config.bMouseControl) {
|
||||
Choice *p = root->Add(new Choice("M", new LayoutParams(WRAP_CONTENT, itemH)));
|
||||
p->OnClick.Handle(this, &ControlMapper::OnAddMouse);
|
||||
}
|
||||
|
||||
LinearLayout *rightColumn = root->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f)));
|
||||
rightColumn->SetSpacing(2.0f);
|
||||
@@ -192,6 +197,12 @@ UI::EventReturn ControlMapper::OnAdd(UI::EventParams ¶ms) {
|
||||
scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, std::placeholders::_1)));
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
UI::EventReturn ControlMapper::OnAddMouse(UI::EventParams ¶ms) {
|
||||
action_ = ADD;
|
||||
g_Config.bMapMouse = true;
|
||||
scrm_->push(new KeyMappingNewKeyDialog(pspKey_, true, std::bind(&ControlMapper::MappedCallback, this, std::placeholders::_1)));
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn ControlMapper::OnDelete(UI::EventParams ¶ms) {
|
||||
int index = atoi(params.v->Tag().c_str());
|
||||
@@ -218,8 +229,6 @@ void ControlMappingScreen::CreateViews() {
|
||||
leftColumn->Add(new Choice(km->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure);
|
||||
}
|
||||
leftColumn->Add(new Choice(km->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs);
|
||||
if (g_Config.bMouseControl)
|
||||
leftColumn->Add(new CheckBox(&g_Config.bMapMouse, km->T("Map Mouse")));
|
||||
leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
AddStandardBack(leftColumn);
|
||||
|
||||
|
||||
Reference in new issue
Block a user