Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Names of episodes are not alligned properly on X axis with original 320px wide resolution. #93

Open
Apaczer opened this issue Jan 26, 2023 · 0 comments
Labels

Comments

@Apaczer
Copy link
Contributor

Apaczer commented Jan 26, 2023

After 2e32bac, the stringEpisode overlap episodeScreens box, which results in following image when playing on native resolution:
image

Preferably the distance between left side of drawRect to screen border should be the same as episodeScreens right side distance to screen border (that is 8px) on X axis. To accomodate I've made small patch for lowend ARM platform, which has 320x wide screen:

diff --git a/src/menu/gamemenu.cpp b/src/menu/gamemenu.cpp
index 8ca3b0f..3e47ebc 100644
--- a/src/menu/gamemenu.cpp
+++ b/src/menu/gamemenu.cpp
@@ -576,16 +576,16 @@ int GameMenu::newGameEpisode (GameModeType mode) {
 
 				// black on white
 				fontmn2->mapPalette(240, 8, 79, -80);
-				drawRect(episodeX - 2, (canvasH >> 1) + (count << 4) - 94,
+				drawRect(8, (canvasH >> 1) + (count << 4) - 94,
 					160, 15, 79);
 
 			} else if (!exists[count])
 				fontmn2->mapPalette(240, 8, 94, -16);
 
 			// align both separately
-			fontmn2->showString(episodeTag[count], episodeX - (count < 6 ? 2 : 0),
+			fontmn2->showString(episodeTag[count], 10,
 				(canvasH >> 1) + (count << 4) - 92);
-			fontmn2->showString(episodeTitle[count], episodeX + 16,
+			fontmn2->showString(episodeTitle[count], 26,
 				(canvasH >> 1) + (count << 4) - 92);
 
 			if ((count == episode) || (!exists[count]))

The effect is as expected, however I don't understand the code and how it alligns text in use with different/bigger resolutions on other platforms:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants