Places map: analog-stick control + gallery loads in place
- Left stick pans (proportional, in screen px) and the right stick up/down zooms, mirroring the detail view's feel; d-pad and L/R triggers still work. - Cluster gallery: a member is placed on the grid only once its date/aspect have resolved, so it drops into its final month section instead of showing as an "unknown" placeholder that reflows the whole grid as metadata arrives. Show "Loading photos..." until the first members come in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011uKJQMYDE9Nrq9ECsU3MxH
This commit is contained in:
@@ -941,6 +941,10 @@ int main(void)
|
||||
draw_centered(SCREEN_H / 2,
|
||||
RGBA8(160, 160, 165, 255),
|
||||
"No results");
|
||||
else if (g_gallery_active && g_disp_count == 0)
|
||||
draw_centered(SCREEN_H / 2,
|
||||
RGBA8(160, 160, 165, 255),
|
||||
"Loading photos...");
|
||||
|
||||
/* pinned Immich-style search bar, slid up by bar_hidden
|
||||
* (Square toggles it); covers items up to its lower edge */
|
||||
@@ -1866,6 +1870,17 @@ pf_skip:
|
||||
if (pad.buttons & SCE_CTRL_DOWN) g_map_cy += pstep;
|
||||
if (pad.buttons & SCE_CTRL_RTRIGGER) g_map_scale *= 1.03;
|
||||
if (pad.buttons & SCE_CTRL_LTRIGGER) g_map_scale /= 1.03;
|
||||
/* left stick pans (proportional, in screen px), right stick
|
||||
* up/down zooms — same feel as the detail view */
|
||||
float lsx = (pad.lx - 128) / 128.0f;
|
||||
float lsy = (pad.ly - 128) / 128.0f;
|
||||
if (lsx > 0.15f || lsx < -0.15f)
|
||||
g_map_cx += lsx * 18.0 / g_map_scale;
|
||||
if (lsy > 0.15f || lsy < -0.15f)
|
||||
g_map_cy += lsy * 18.0 / g_map_scale;
|
||||
float rsy = (128 - pad.ry) / 128.0f; /* up positive = zoom in */
|
||||
if (rsy > 0.18f || rsy < -0.18f)
|
||||
g_map_scale *= 1.0 + rsy * 0.04;
|
||||
if (pressed & SCE_CTRL_TRIANGLE) g_map_grid = !g_map_grid;
|
||||
map_clamp_view();
|
||||
|
||||
|
||||
+9
-4
@@ -176,16 +176,21 @@ static void layout_grid(void)
|
||||
* server asset is shown once, as the server asset (green badge). */
|
||||
static void rebuild_display(void)
|
||||
{
|
||||
/* map cluster gallery: show exactly the selected bubble's members (server
|
||||
* assets), date-grouped like the timeline. Members whose metadata hasn't
|
||||
* resolved yet have an empty date and sort to the end until it arrives. */
|
||||
/* map cluster gallery: show the selected bubble's members (server assets),
|
||||
* date-grouped like the timeline. A member is placed only once its
|
||||
* date/aspect have resolved, so it drops straight into its final spot
|
||||
* rather than appearing as an "unknown" placeholder that reflows the whole
|
||||
* grid when its metadata later arrives. The rest stream in as they load. */
|
||||
if (g_gallery_active) {
|
||||
if (!grow_disp(g_gallery_count > 0 ? g_gallery_count : 1))
|
||||
return;
|
||||
int n = 0;
|
||||
for (int k = 0; k < g_gallery_count; k++) {
|
||||
int idx = g_gallery_idx[k];
|
||||
if (g_asset_dates[idx][0] == '\0')
|
||||
continue; /* metadata not in yet: not placeable */
|
||||
g_disp[n].src = SRC_SERVER;
|
||||
g_disp[n].idx = g_gallery_idx[k];
|
||||
g_disp[n].idx = idx;
|
||||
n++;
|
||||
}
|
||||
g_disp_count = n;
|
||||
|
||||
Reference in New Issue
Block a user