| 1 |
/* |
| 2 |
* Copyright (C) 2017-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "GUIDialogButtonCapture.h" |
| 12 |
#include "input/joysticks/DriverPrimitive.h" |
| 13 |
|
| 14 |
#include <string> |
| 15 |
#include <vector> |
| 16 |
|
| 17 |
namespace KODI |
| 18 |
{ |
| 19 |
namespace GAME |
| 20 |
{ |
| 21 |
/*! |
| 22 |
* \ingroup games |
| 23 |
*/ |
| 24 |
class CGUIDialogIgnoreInput : public CGUIDialogButtonCapture |
| 25 |
{ |
| 26 |
public: |
| 27 |
CGUIDialogIgnoreInput() = default; |
| 28 |
|
| 29 |
~CGUIDialogIgnoreInput() override = default; |
| 30 |
|
| 31 |
// specialization of IButtonMapper via CGUIDialogButtonCapture |
| 32 |
bool AcceptsPrimitive(JOYSTICK::PRIMITIVE_TYPE type) const override; |
| 33 |
|
| 34 |
protected: |
| 35 |
// implementation of CGUIDialogButtonCapture |
| 36 |
std::string GetDialogText() override; |
| 37 |
std::string GetDialogHeader() override; |
| 38 |
bool MapPrimitiveInternal(JOYSTICK::IButtonMap* buttonMap, |
| 39 |
KEYMAP::IKeymap* keymap, |
| 40 |
const JOYSTICK::CDriverPrimitive& primitive) override; |
| 41 |
void OnClose(bool bAccepted) override; |
| 42 |
|
| 43 |
private: |
| 44 |
bool AddPrimitive(const JOYSTICK::CDriverPrimitive& primitive); |
| 45 |
|
| 46 |
std::string m_location; |
| 47 |
std::vector<JOYSTICK::CDriverPrimitive> m_capturedPrimitives; |
| 48 |
}; |
| 49 |
} // namespace GAME |
| 50 |
} // namespace KODI |