2017-03-24 03:47:43 +01:00
|
|
|
/*****************************************************************************
|
2023-01-01 11:58:01 +01:00
|
|
|
* Copyright (c) 2014-2023 OpenRCT2 developers
|
2018-06-15 14:07:34 +02:00
|
|
|
*
|
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
|
|
*
|
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
|
|
*****************************************************************************/
|
2017-03-24 03:47:43 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-20 20:58:59 +02:00
|
|
|
#include <memory>
|
2017-03-24 03:47:43 +01:00
|
|
|
#include <openrct2/common.h>
|
2018-06-22 23:22:29 +02:00
|
|
|
#include <string>
|
2020-10-21 19:53:22 +02:00
|
|
|
#include <vector>
|
2017-03-24 03:47:43 +01:00
|
|
|
|
2017-03-25 15:57:02 +01:00
|
|
|
struct SDL_Window;
|
|
|
|
|
2017-03-24 03:47:43 +01:00
|
|
|
namespace OpenRCT2
|
|
|
|
{
|
2020-07-30 23:19:53 +02:00
|
|
|
struct IContext;
|
|
|
|
struct IPlatformEnvironment;
|
2017-03-24 03:47:43 +01:00
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
2018-06-22 23:22:29 +02:00
|
|
|
struct FileDialogDesc;
|
|
|
|
class InGameConsole;
|
2020-07-30 23:19:53 +02:00
|
|
|
struct IUiContext;
|
2017-03-24 03:47:43 +01:00
|
|
|
|
2020-07-30 23:19:53 +02:00
|
|
|
struct IPlatformUiContext
|
2017-03-25 15:57:02 +01:00
|
|
|
{
|
|
|
|
virtual ~IPlatformUiContext() = default;
|
2020-07-30 23:19:53 +02:00
|
|
|
virtual void SetWindowIcon(SDL_Window* window) abstract;
|
2017-03-25 15:57:02 +01:00
|
|
|
virtual bool IsSteamOverlayAttached() abstract;
|
2017-04-01 18:27:39 +02:00
|
|
|
|
2020-07-30 23:19:53 +02:00
|
|
|
virtual void ShowMessageBox(SDL_Window* window, const std::string& message) abstract;
|
2020-10-21 19:53:22 +02:00
|
|
|
virtual bool HasMenuSupport() abstract;
|
2020-12-13 16:02:57 +01:00
|
|
|
virtual int32_t ShowMenuDialog(
|
2020-10-21 19:53:22 +02:00
|
|
|
const std::vector<std::string>& options, const std::string& title, const std::string& text) abstract;
|
2018-09-04 11:40:51 +02:00
|
|
|
virtual void OpenFolder(const std::string& path) abstract;
|
2020-07-30 23:19:53 +02:00
|
|
|
|
2020-07-26 21:57:56 +02:00
|
|
|
virtual void OpenURL(const std::string& url) abstract;
|
2020-07-30 23:19:53 +02:00
|
|
|
virtual std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) abstract;
|
|
|
|
virtual std::string ShowDirectoryDialog(SDL_Window* window, const std::string& title) abstract;
|
2020-11-08 13:29:44 +01:00
|
|
|
|
|
|
|
virtual bool HasFilePicker() const abstract;
|
2017-03-25 15:57:02 +01:00
|
|
|
};
|
|
|
|
|
2021-08-23 20:09:43 +02:00
|
|
|
[[nodiscard]] std::unique_ptr<IUiContext> CreateUiContext(const std::shared_ptr<IPlatformEnvironment>& env);
|
2022-07-28 19:19:38 +02:00
|
|
|
[[nodiscard]] std::unique_ptr<IPlatformUiContext> CreatePlatformUiContext();
|
2018-03-11 23:25:34 +01:00
|
|
|
|
2021-08-23 20:09:43 +02:00
|
|
|
[[nodiscard]] InGameConsole& GetInGameConsole();
|
2018-05-04 22:40:09 +02:00
|
|
|
} // namespace Ui
|
|
|
|
} // namespace OpenRCT2
|