╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────╮ │1027 flow_box_scroll: FlowBox.Scroll,│ │1028 spacer: Spacer, │ │1029 center: Center, │ │1030 - ansi_art: AnsiArt, │ │1030 background: AnsiBackground, │ │1031 home: Home.View, │ │1032 user: User.View, │ ╰──────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1487 focus: *Focus, │ │1488 grid: ?Grid, │ │1489 child: *Widget, │ │1491 - direction: Direction, │ │1492 - │ │1493 - pub const Direction = enum { both, horiz, vert }; │ │1490 │ │1495 - pub fn init(allocator: std.mem.Allocator, child_widget: Widget, direction: Direction) !Center {│ │1491 + pub fn init(allocator: std.mem.Allocator, child_widget: Widget) !Center { │ │1492 const child = try allocator.create(Widget); │ │1493 errdefer allocator.destroy(child); │ │1494 child.* = child_widget; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────╮ │1496 .focus = try Focus.create(allocator, .container),│ │1497 .grid = null, │ │1498 .child = child, │ │1503 - .direction = direction, │ │1499 }; │ │1500 } │ │1501 │ ╰───────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1530 const height = if (constraint.max_size.height) |h| h else if (constraint.min_size.height) |min_h| @max(min_h, child_grid.size.height) else child_grid.size.height;│ │1531 if (width == 0 or height == 0) return; │ │1532 │ │1538 - const offset_x: usize = if (self.direction == .horiz or self.direction == .both) │ │1539 - (width -| child_grid.size.width) / 2 │ │1540 - else │ │1541 - 0; │ │1542 - const offset_y: usize = if (self.direction == .vert or self.direction == .both) │ │1543 - (height -| child_grid.size.height) / 2 │ │1544 - else │ │1545 - 0; │ │1533 + const offset_x: usize = (width -| child_grid.size.width) / 2; │ │1534 + const offset_y: usize = (height -| child_grid.size.height) / 2; │ │1535 │ │1536 var grid = try Grid.init(allocator, .{ .width = width, .height = height }); │ │1537 errdefer grid.deinit(); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1656 } │ │1657 } │ │1658 self.grid = grid; │ │1670 - } │ │1671 - │ │1672 - pub fn input(self: *AnsiArt, allocator: std.mem.Allocator, key: inp.Key, root_focus: *Focus) !void {│ │1673 - _ = self; │ │1674 - _ = allocator; │ │1675 - _ = key; │ │1676 - _ = root_focus; │ │1659 } │ │1660 │ │1661 pub fn clearGrid(self: *AnsiArt) void { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯