From e5c855ffa22501cc9ad2af9b58ddd8d39a9df641 Mon Sep 17 00:00:00 2001 From: hernan Date: Mon, 3 Aug 2026 09:04:32 -0400 Subject: [PATCH] Shorten the 1ST rung label so it fits the screen At 18 characters '1ST (EXPERIMENTAL)' is wider than the value column, so on a phone the rung is drawn past the right edge of the 160px screen and reads as missing -- the row appears to stop at 75 and players conclude first person is not in the build. It is selectable the whole time. The Game Boy screen is 160px and OptionRows draws a value at x=24, so a value has about 17 characters before it runs off. '1ST' is what the mode is called everywhere else in the code (FP_LEVEL, isFirstPerson), and the experimental status is already in the mod description and the changelog. Tests updated for the new label. Co-Authored-By: Claude Opus 5 --- lib/VoxelState.lua | 3 +-- tests/dramatic_shape_test.lua | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/VoxelState.lua b/lib/VoxelState.lua index 3e8bb45..e19b314 100644 --- a/lib/VoxelState.lua +++ b/lib/VoxelState.lua @@ -42,8 +42,7 @@ local Voxel = {} -- billboard lean the blend eases away) reads that 75 while the first-person -- rig owns the actual camera. Voxel.ANGLES_DEG = { 0, 35, 15, 35, 50, 75, 75 } -Voxel.ANGLE_LABELS = { "OFF", "FULL", "15", "35", "50", "75", - "1ST (EXPERIMENTAL)" } +Voxel.ANGLE_LABELS = { "OFF", "FULL", "15", "35", "50", "75", "1ST" } Voxel.MAX_LEVEL = #Voxel.ANGLES_DEG - 1 -- the rung FULL sits on, so nothing has to hunt for it by label diff --git a/tests/dramatic_shape_test.lua b/tests/dramatic_shape_test.lua index 2b7cf7d..38b86b2 100644 --- a/tests/dramatic_shape_test.lua +++ b/tests/dramatic_shape_test.lua @@ -54,7 +54,7 @@ T.eq(defs.voxel.levels[1], "OFF", "rung 0 is OFF") T.eq(defs.voxel.levels[2], "FULL", "FULL is the first rung after OFF -- the order those two get used in") T.eq(defs.voxel.levels[6], "75", "rung 5 is the 75-degree camera") -T.eq(defs.voxel.levels[7], "1ST (EXPERIMENTAL)", +T.eq(defs.voxel.levels[7], "1ST", "the top rung is the first-person camera, labelled as the experiment it is") T.eq(Pipelines.maxLevel("voxel"), 6, "the engine reads the ladder height") T.eq(Pipelines.levelLabel("voxel", 3), "35", "the engine reads the rung labels") @@ -1088,7 +1088,7 @@ for _ = 1, 7 do Game.keypressed(keyGame, "3") walk[#walk + 1] = Pipelines.levelLabel("voxel") end -T.eq(table.concat(walk, ","), "15,35,50,75,1ST (EXPERIMENTAL),OFF,15", +T.eq(table.concat(walk, ","), "15,35,50,75,1ST,OFF,15", "3 walks OFF -> 15 -> 35 -> 50 -> 75 -> 1ST and wraps, never touching FULL") -- FULL is 35 degrees, so a press from it goes ON to 50 rather than back to @@ -3515,7 +3515,7 @@ local Voxel3D = run.loader.exports.DRAMATIC_SHAPE.lib.require("Voxel3D") T.eq(VoxelState.FP_LEVEL, 6, "1ST is the seventh rung") T.check(VoxelState.isFirstPerson(6), "and isFirstPerson answers for it") T.check(not VoxelState.isFirstPerson(5), "but not for the 75 orbit") -T.eq(VoxelState.ANGLE_LABELS[VoxelState.FP_LEVEL + 1], "1ST (EXPERIMENTAL)", +T.eq(VoxelState.ANGLE_LABELS[VoxelState.FP_LEVEL + 1], "1ST", "the rung wears the experimental label") T.eq(VoxelState.ANGLES_DEG[VoxelState.FP_LEVEL + 1], 75, "and hands the blend the 75-degree orbit as its far end")