Polish the new workaround, seems to be nice and simple.

This commit is contained in:
LunaMoo committed 2017-04-27 11:12:11 +02:00
1 parent a0b904c7e8
commit 45304476e2
2 files changed
+77 -2

No files matched your search

+23
View File
@@ -70,6 +70,29 @@ private:
bool mapped_; // Prevent double registrations
};
class KeyMappingNewMouseKeyDialog : public PopupScreen {
public:
explicit KeyMappingNewMouseKeyDialog(int btn, bool replace, std::function<void(KeyDef)> callback)
: PopupScreen("Map Mouse", "", ""), callback_(callback), mapped_(false) {
pspBtn_ = btn;
}
virtual bool key(const KeyInput &key) override;
virtual bool axis(const AxisInput &axis) override;
protected:
void CreatePopupContents(UI::ViewGroup *parent) override;
virtual bool FillVertical() const override { return false; }
virtual bool ShowButtons() const override { return true; }
virtual void OnCompleted(DialogResult result) override {}
private:
int pspBtn_;
std::function<void(KeyDef)> callback_;
bool mapped_; // Prevent double registrations
};
class AnalogTestScreen : public UIDialogScreenWithBackground {
public:
AnalogTestScreen() {}