-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
UiContext.Android.cpp
70 lines (56 loc) 路 1.67 KB
/
UiContext.Android.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*****************************************************************************
* Copyright (c) 2014-2018 OpenRCT2 developers
*
* 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.
*****************************************************************************/
#ifdef __ANDROID__
# include "UiContext.h"
# include <SDL.h>
# include <dlfcn.h>
# include <openrct2/common.h>
# include <openrct2/core/String.hpp>
# include <openrct2/ui/UiContext.h>
# include <sstream>
# include <stdexcept>
namespace OpenRCT2::Ui
{
class AndroidContext final : public IPlatformUiContext
{
private:
public:
AndroidContext()
{
}
void SetWindowIcon(SDL_Window* window) override
{
}
bool IsSteamOverlayAttached() override
{
return false;
}
void ShowMessageBox(SDL_Window* window, const std::string& message) override
{
log_verbose(message.c_str());
STUB();
}
std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) override
{
STUB();
return nullptr;
}
std::string ShowDirectoryDialog(SDL_Window* window, const std::string& title) override
{
log_info(title.c_str());
STUB();
return "/sdcard/rct2";
}
};
IPlatformUiContext* CreatePlatformUiContext()
{
return new AndroidContext();
}
} // namespace OpenRCT2::Ui
#endif // __ANDROID__