forked from rosebudai/OpenRCT2-Web
Get the game working
Mostly just needed to resolve screen size which is now retrieved via ui context.
This commit is contained in:
1 parent
7163973bd2
commit
bd9839ff50
47 files changed
+208
-153
No files matched your search
@@ -22,7 +22,17 @@
|
||||
|
||||
using namespace OpenRCT2::Ui;
|
||||
|
||||
CursorRepository::CursorRepository()
|
||||
CursorRepository::~CursorRepository()
|
||||
{
|
||||
for (size_t i = 0; i < CURSOR_COUNT; i++)
|
||||
{
|
||||
SDL_FreeCursor(_loadedCursors[i]);
|
||||
_loadedCursors[i] = nullptr;
|
||||
}
|
||||
_currentCursor = CURSOR_UNDEFINED;
|
||||
}
|
||||
|
||||
void CursorRepository::LoadCursors()
|
||||
{
|
||||
// Using system cursors
|
||||
_loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
|
||||
@@ -42,16 +52,6 @@ CursorRepository::CursorRepository()
|
||||
SetCurrentCursor(CURSOR_ARROW);
|
||||
}
|
||||
|
||||
CursorRepository::~CursorRepository()
|
||||
{
|
||||
for (size_t i = 0; i < CURSOR_COUNT; i++)
|
||||
{
|
||||
SDL_FreeCursor(_loadedCursors[i]);
|
||||
_loadedCursors[i] = nullptr;
|
||||
}
|
||||
_currentCursor = CURSOR_UNDEFINED;
|
||||
}
|
||||
|
||||
CURSOR_ID CursorRepository::GetCurrentCursor()
|
||||
{
|
||||
return _currentCursor;
|
||||
|
||||
Reference in new issue
Block a user