| 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 "guilib/GUIDialog.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
namespace KODI |
| 16 |
{ |
| 17 |
namespace GAME |
| 18 |
{ |
| 19 |
class CDialogGameOSDHelp; |
| 20 |
|
| 21 |
/*! |
| 22 |
* \ingroup games |
| 23 |
*/ |
| 24 |
class CDialogGameOSD : public CGUIDialog |
| 25 |
{ |
| 26 |
public: |
| 27 |
CDialogGameOSD(); |
| 28 |
|
| 29 |
~CDialogGameOSD() override = default; |
| 30 |
|
| 31 |
// Implementation of CGUIControl via CGUIDialog |
| 32 |
bool OnAction(const CAction& action) override; |
| 33 |
|
| 34 |
// Implementation of CGUIWindow via CGUIDialog |
| 35 |
void OnDeinitWindow(int nextWindowID) override; |
| 36 |
|
| 37 |
/*! |
| 38 |
* \brief Decide if the game should play behind the given dialog |
| 39 |
* |
| 40 |
* If true, the game should be played at regular speed. |
| 41 |
* |
| 42 |
* \param dialog The current dialog |
| 43 |
* |
| 44 |
* \return True if the game should be played at regular speed behind the |
| 45 |
* dialog, false otherwise |
| 46 |
*/ |
| 47 |
static bool PlayInBackground(int dialogId); |
| 48 |
|
| 49 |
protected: |
| 50 |
// Implementation of CGUIWindow via CGUIDialog |
| 51 |
void OnInitWindow() override; |
| 52 |
|
| 53 |
private: |
| 54 |
std::unique_ptr<CDialogGameOSDHelp> m_helpDialog; |
| 55 |
}; |
| 56 |
} // namespace GAME |
| 57 |
} // namespace KODI |