- If resolution width is greater than 1280 pixels, then show a double-size mouse pointer in the menu (#62)

This commit is contained in:
Dimitris Panokostas 2017-04-06 00:03:07 +02:00
parent fb023d0546
commit 243f563271
6 changed files with 18 additions and 2 deletions

View file

@ -88,6 +88,7 @@
<Image Include="..\data\cpu.ico"> <Image Include="..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>
</Image> </Image>
<Image Include="..\data\cursor-x2.bmp" />
<Image Include="..\data\cursor.bmp"> <Image Include="..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>
</Image> </Image>

View file

@ -131,6 +131,9 @@
<Image Include="..\data\cursor.bmp"> <Image Include="..\data\cursor.bmp">
<Filter>data</Filter> <Filter>data</Filter>
</Image> </Image>
<Image Include="..\data\cursor-x2.bmp">
<Filter>data</Filter>
</Image>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Font Include="..\data\FreeSans.ttf"> <Font Include="..\data\FreeSans.ttf">

View file

@ -272,6 +272,7 @@
<Image Include="..\..\data\cpu.ico"> <Image Include="..\..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>
</Image> </Image>
<Image Include="..\..\data\cursor-x2.bmp" />
<Image Include="..\..\data\cursor.bmp"> <Image Include="..\..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent> <DeploymentContent>true</DeploymentContent>
</Image> </Image>

View file

@ -602,6 +602,9 @@
<Image Include="..\..\data\cursor.bmp"> <Image Include="..\..\data\cursor.bmp">
<Filter>Resource files\data</Filter> <Filter>Resource files\data</Filter>
</Image> </Image>
<Image Include="..\..\data\cursor-x2.bmp">
<Filter>Resource files\data</Filter>
</Image>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Font Include="..\..\data\FreeSans.ttf"> <Font Include="..\..\data\FreeSans.ttf">

BIN
data/cursor-x2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -62,6 +62,7 @@ SDL_Surface* gui_screen;
SDL_Texture* gui_texture; SDL_Texture* gui_texture;
SDL_Event gui_event; SDL_Event gui_event;
SDL_Cursor* cursor; SDL_Cursor* cursor;
SDL_Surface *cursorSurface;
/* /*
* Guisan SDL stuff we need * Guisan SDL stuff we need
@ -156,8 +157,15 @@ namespace sdl
//------------------------------------------------- //-------------------------------------------------
// Create new screen for GUI // Create new screen for GUI
//------------------------------------------------- //-------------------------------------------------
if (sdlMode.w > 1280)
SDL_Surface *cursorSurface = SDL_LoadBMP("data/cursor.bmp"); {
// High resolution detected, we'll use a double-size cursor
cursorSurface = SDL_LoadBMP("data/cursor-x2.bmp");
}
else
{
cursorSurface = SDL_LoadBMP("data/cursor.bmp");
}
if (cursorSurface) if (cursorSurface)
{ {
cursor = SDL_CreateColorCursor(cursorSurface, 0, 0); cursor = SDL_CreateColorCursor(cursorSurface, 0, 0);