Skip to content

Commit 8c441be

Browse files
committed
Address feedback
1 parent 037d047 commit 8c441be

2 files changed

Lines changed: 10 additions & 16 deletions

File tree

UI/ControlMappingScreen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ void KeyMappingDialog::CreatePopupContents(UI::ViewGroup *parent) {
352352
LinearLayout *items = new LinearLayoutList(ORIENT_VERTICAL);
353353
items->SetSpacing(5.0f);
354354

355-
static const std::string hint = "Hint: you may map the same key to different PSP button to be able to press multiple one with a single key!";
356-
parent->Add(new TextView(km->T(hint), FLAG_DYNAMIC_ASCII | FLAG_WRAP_TEXT, true, new LinearLayoutParams(Margins(10,0))));
355+
static const std::string hint = "Hint: Mapping the same key to multiple PSP buttons will press both at once";
356+
parent->Add(new TextView(km->T(hint), FLAG_WRAP_TEXT, true, new LinearLayoutParams(Margins(10,0))));
357357

358358
std::vector<KeyDef> mappings;
359359
KeyMap::KeyFromPspButton(pspBtn_, &mappings, false);
@@ -402,8 +402,8 @@ void KeyMappingDialog::CreatePopupContents(UI::ViewGroup *parent) {
402402
}
403403

404404
items->Add(new Spacer(10.0));
405-
Choice *b = items->Add(new Choice(di->T("Back"), new LinearLayoutParams(FILL_PARENT, 45)));
406-
b->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
405+
Button *b = items->Add(new Button(di->T("Cancel"), new LinearLayoutParams(FILL_PARENT, 45)));
406+
b->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
407407

408408
scroll->Add(items);
409409
parent->Add(scroll);

UI/ControlMappingScreen.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "Common/UI/View.h"
2626
#include "Common/UI/UIScreen.h"
27+
#include "Common/StringUtils.h"
2728
#include "Common/Data/Text/I18n.h"
2829

2930
#include "Core/ControlMapper.h"
@@ -62,16 +63,12 @@ class KeyMappingNewKeyDialog : public PopupScreen {
6263
pspBtn_ = btn;
6364
}
6465

65-
virtual bool key(const KeyInput &key) override;
66-
virtual bool axis(const AxisInput &axis) override;
66+
bool key(const KeyInput &key) override;
67+
bool axis(const AxisInput &axis) override;
6768

6869
protected:
6970
void CreatePopupContents(UI::ViewGroup *parent) override;
7071

71-
virtual bool FillVertical() const override { return false; }
72-
virtual bool ShowButtons() const override { return true; }
73-
virtual void OnCompleted(DialogResult result) override {}
74-
7572
private:
7673
int pspBtn_;
7774
std::function<void(KeyDef)> callback_;
@@ -83,17 +80,14 @@ class BindingChoice;
8380
class KeyMappingDialog : public PopupScreen {
8481
public:
8582
explicit KeyMappingDialog(int btn, std::shared_ptr<I18NCategory> i18n)
86-
: PopupScreen(std::string(i18n->T("Mapping for"))+" "+i18n->T(KeyMap::GetPspButtonName(btn))), pspBtn_(btn) {}
83+
: PopupScreen(ReplaceAll(i18n->T("Mapping for %1"), "%1", i18n->T(KeyMap::GetPspButtonName(btn)))), pspBtn_(btn) {}
8784

88-
virtual bool key(const KeyInput &key) override;
89-
virtual bool axis(const AxisInput &axis) override;
85+
bool key(const KeyInput &key) override;
86+
bool axis(const AxisInput &axis) override;
9087

9188
protected:
9289
void CreatePopupContents(UI::ViewGroup *parent) override;
9390

94-
virtual bool FillVertical() const override { return false; }
95-
virtual bool ShowButtons() const override { return true; }
96-
9791
private:
9892
int pspBtn_;
9993
BindingChoice *selected_;

0 commit comments

Comments
 (0)