Add zoom steps and a larger start caption to the game link (#266)
The released game only ever zoomed in whole steps up to 400%, so a small camera on a large screen stayed far smaller than it could be. The "Click to play" caption was drawn in the 11 px panel title size and was easy to miss. - GAME_SCALE_STEPS gains 300%, 500% and 600%. The game tab picker, Auto in the editor and the game link all read the same list. - The start caption takes its size from the new Theme.captionSize (16) instead of a constant in GameScreen. - The player page keeps the default arrow cursor at all times. It no longer switches to the hand over the caption. Tests: - view.test: Auto for 320x180 in 2000x2000 is now 6, with cases for 3 and 5. play-settings.test takes 2.5 and 8 as invalid steps. - e2e 60 checks the caption against the panel title size and the arrow cursor before and after the start. Module 03 follows the new step list. - ./check.sh 2808 tests, CHECK EXIT 0 (before the last Theme tweak, which changes no test). Full e2e run ALL PASSED, 1574 checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4194f3e150
commit
24d360aeec
8 files changed
+40
-9
No files matched your search
@@ -40,7 +40,10 @@ describe('play settings in the project', () => {
|
||||
expect(playFromOf(null)).toBe('start');
|
||||
expect(gameScaleOf({ gameScale: 'fit' })).toBe('fit');
|
||||
expect(gameScaleOf({ gameScale: 0.25 })).toBe(0.25);
|
||||
expect(gameScaleOf({ gameScale: 3 })).toBe(1);
|
||||
expect(gameScaleOf({ gameScale: 3 })).toBe(3);
|
||||
expect(gameScaleOf({ gameScale: 6 })).toBe(6);
|
||||
expect(gameScaleOf({ gameScale: 2.5 })).toBe(1);
|
||||
expect(gameScaleOf({ gameScale: 8 })).toBe(1);
|
||||
expect(gameScaleOf({ gameScale: '2' })).toBe(1);
|
||||
});
|
||||
|
||||
|
||||
@@ -206,7 +206,9 @@ describe('gameScaleFactor', () => {
|
||||
expect(gameScaleFactor('auto', 640, 360, 800, 600)).toBe(1);
|
||||
expect(gameScaleFactor('auto', 640, 360, 1280, 720)).toBe(2);
|
||||
expect(gameScaleFactor('auto', 640, 360, 639, 600)).toBe(0.5);
|
||||
expect(gameScaleFactor('auto', 320, 180, 2000, 2000)).toBe(4);
|
||||
expect(gameScaleFactor('auto', 320, 180, 1000, 800)).toBe(3);
|
||||
expect(gameScaleFactor('auto', 320, 180, 1700, 1000)).toBe(5);
|
||||
expect(gameScaleFactor('auto', 320, 180, 2000, 2000)).toBe(6);
|
||||
});
|
||||
|
||||
it('auto falls back to the smallest step when not even that fits', () => {
|
||||
|
||||
Reference in new issue
Block a user