Windows: Added manifest file

Removed hardcoded image sizes for menu corners, 
Small GUI fixes:
- Correctly check for Enter key in game over menu
- Properly set focus in event menu

git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@721 0420edf4-82e4-42fc-9478-35b55e6d67a3
master
pkeus 2020-02-27 20:16:34 +00:00
parent 677c5d6b94
commit 8534ab350b
10 changed files with 37 additions and 6 deletions

View File

@ -304,6 +304,9 @@
<ItemGroup>
<ResourceCompile Include="..\version.rc" />
</ItemGroup>
<ItemGroup>
<Manifest Include="..\resources\app.manifest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -317,4 +317,9 @@
<Filter>Resource files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\resources\app.manifest">
<Filter>Resource files</Filter>
</Manifest>
</ItemGroup>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 34 KiB

23
resources/app.manifest Normal file
View File

@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true/pm</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

View File

@ -150,7 +150,7 @@ void CEvent::Enter() {
int len = FT.GetTextWidth(Trans.Text(13));
textbuttons[0] = AddTextButton(Trans.Text(13), area.right -len - 100, AutoYPosN(80), siz);
textbuttons[2] = AddTextButton(Trans.Text(15), CENTER, AutoYPosN(80), siz);
SetFocus((ready == 2) ? textbuttons[2] : textbuttons[0]);
SetFocus((ready >= 1) ? textbuttons[2] : textbuttons[0]);
FT.AutoSizeN(6);
headline = AddLabel(ecup->name, CENTER, AutoYPosN(25), colWhite);
@ -219,7 +219,7 @@ void CEvent::Loop(float time_step) {
FT.DrawString(CENTER, messtop, Trans.Text(16));
DrawBonusExt(bonustop, (int)ecup->races.size(), curr_bonus);
int res = resultlevel(curr_bonus, ecup->races.size());
FT.DrawString(CENTER, messtop2, Trans.Text(17) + " " + Int_StrN(res));
FT.DrawString(CENTER, messtop2, Trans.Text(17) + " " + Int_StrN(res));
} else if (ready == 2) { // cup finished but failed
FT.AutoSizeN(5);
FT.SetColor(colLRed);

View File

@ -55,7 +55,7 @@ void QuitGameOver() {
void CGameOver::Keyb(sf::Keyboard::Key key, bool release, int x, int y) {
if (release) return;
if (key == 13 || key == sf::Keyboard::Escape) QuitGameOver();
if (key == sf::Keyboard::Enter || key == sf::Keyboard::Escape) QuitGameOver();
}
void CGameOver::Mouse(int button, int state, int x, int y) {

View File

@ -639,9 +639,9 @@ void DrawGUIFrame() {
static sf::Sprite top_left(Tex.GetSFTexture(TOP_LEFT));
static sf::Sprite top_right(Tex.GetSFTexture(TOP_RIGHT));
bottom_left.setPosition(0, Winsys.resolution.height - 256);
bottom_right.setPosition(Winsys.resolution.width - 256, Winsys.resolution.height - 256);
top_right.setPosition(Winsys.resolution.width - 256, 0);
bottom_left.setPosition(0, Winsys.resolution.height - bottom_left.getTexture()->getSize().y);
bottom_right.setPosition(Winsys.resolution.width - bottom_right.getTexture()->getSize().x, Winsys.resolution.height - bottom_right.getTexture()->getSize().y);
top_right.setPosition(Winsys.resolution.width - top_right.getTexture()->getSize().x, 0);
Winsys.draw(bottom_left);
Winsys.draw(bottom_right);