summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.zig30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 61bd61f0..63cee882 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -1873,6 +1873,8 @@ fn ndcBox(box: pardes.animation.Box, layout: CellLayout, win_w: f32, win_h: f32)
};
}
+/// A new instance's transition fields for `track`, which moves its pane;
+/// with none it keeps its defaults (still, all of it shown).
fn setTransitionFields(
instance: anytype,
track: ?pardes.animation.Track,
@@ -1881,21 +1883,7 @@ fn setTransitionFields(
win_h: f32,
cell_coord: u32,
) void {
- const active = track orelse {
- instance.panel_x0 = 0;
- instance.panel_y0 = 0;
- instance.panel_x1 = 0;
- instance.panel_y1 = 0;
- instance.present_x0 = 0;
- instance.present_y0 = 0;
- instance.present_x1 = 0;
- instance.present_y1 = 0;
- instance.effect = 0;
- instance.progress_bits = @bitCast(@as(f32, 1));
- instance.serial = 0;
- instance.cell_coord = cell_coord;
- return;
- };
+ const active = track orelse return;
const final = ndcBox(active.contentBox(), layout, win_w, win_h);
const presented = ndcBox(active.visualBox(), layout, win_w, win_h);
instance.panel_x0 = final[0];
@@ -7507,18 +7495,6 @@ fn emitInstance(
.br = @as(f32, @floatFromInt(resolved.bg[0])) / 255.0,
.bg = @as(f32, @floatFromInt(resolved.bg[1])) / 255.0,
.bb = @as(f32, @floatFromInt(resolved.bg[2])) / 255.0,
- .panel_x0 = 0,
- .panel_y0 = 0,
- .panel_x1 = 0,
- .panel_y1 = 0,
- .present_x0 = 0,
- .present_y0 = 0,
- .present_x1 = 0,
- .present_y1 = 0,
- .effect = 0,
- .progress_bits = @bitCast(@as(f32, 1)),
- .serial = 0,
- .cell_coord = 0,
};
setTransitionFields(
&instances[idx],