Skip to content

Commit 85eb26b

Browse files
committed
RC1 for first app release
1 parent a5c862f commit 85eb26b

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

build.zig.zon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .engine,
3-
.version = "0.8.3",
3+
.version = "0.9.0",
44
.fingerprint = 0xe8a81a8d0aa558d5,
55
.minimum_zig_version = "0.15.2",
66
.dependencies = .{
@@ -17,8 +17,8 @@
1717
.hash = "zigimg-0.1.0-8_eo2vBrFQBhsrLpexdcDQY-zrlzkyFZfKuYX-Nry6KN",
1818
},
1919
.resources = .{
20-
.url = "git+https://github.com/loftafi/resources.git#b65dd592bc1fb1eadbb5b1b6ca8cf8015ee8a669",
21-
.hash = "resources-0.7.5-J0GwI0o7AgAv3hn0V03TUNxFQBnPSlKv85pkJDd2boL4",
20+
.url = "git+https://github.com/loftafi/resources.git#a2e19ef2f160fa6b2f604f4be9ea74d46220a3a0",
21+
.hash = "resources-0.8.0-J0GwI0A7AgDmjLZCTHb_b6QF49HOtRUwcRTJ4jHVXBFF",
2222
},
2323
},
2424
.paths = .{

src/engine.zig

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6023,14 +6023,24 @@ test "text input sizing" {
60236023
try eq(88, l.shrink_height(display, 115));
60246024
}
60256025

6026-
const label = try create_label(allocator, display, .{
6026+
var panel = try display.add_panel(allocator, .{
6027+
.rect = .{ .width = 500, .height = 200 },
6028+
.minimum = .{ .width = 5, .height = 8 },
6029+
.type = .{ .panel = .{ .spacing = 0, .direction = .top_to_bottom } },
6030+
.layout = .{ .x = .shrinks, .y = .shrinks },
6031+
});
6032+
try eq(5, panel.shrink_width(display, 500));
6033+
try eq(8, panel.shrink_height(display, 500));
6034+
6035+
var label = try panel.add(allocator, display, .{
60276036
.name = "hello",
60286037
.rect = .{ .width = 500, .height = 60 },
60296038
.minimum = .{ .width = 300, .height = 100 },
60306039
.maximum = .{ .width = 401, .height = 201 },
60316040
.type = .{ .label = .{ .text = "Hello world" } },
60326041
.layout = .{ .x = .fixed, .y = .fixed },
60336042
});
6043+
60346044
label.pad = .{ .top = 0, .bottom = 0, .left = 0, .right = 0 };
60356045
try eq(500, label.shrink_width(display, 500));
60366046
try eq(100, label.shrink_height(display, 500));
@@ -6044,20 +6054,11 @@ test "text input sizing" {
60446054
label.layout.x = .grows;
60456055
try eq(91, @round(label.shrink_width(display, 500)));
60466056

6047-
var panel = try display.add_panel(allocator, .{
6048-
.rect = .{ .width = 500, .height = 200 },
6049-
.minimum = .{ .width = 5, .height = 8 },
6050-
.type = .{ .panel = .{ .spacing = 0, .direction = .top_to_bottom } },
6051-
.layout = .{ .x = .shrinks, .y = .shrinks },
6052-
});
6053-
try eq(5, panel.shrink_width(display, 500));
6054-
try eq(8, panel.shrink_height(display, 500));
6055-
60566057
panel.layout.x = .shrinks;
60576058
panel.layout.y = .shrinks;
60586059
label.layout.x = .grows;
60596060
label.layout.y = .shrinks;
6060-
_ = try panel.add(allocator, display, label.*);
6061+
60616062
label.pad.top = 0;
60626063
label.pad.bottom = 0;
60636064
display.relayout();
@@ -6069,6 +6070,7 @@ test "text input sizing" {
60696070
label.maximum.width,
60706071
label.maximum.height,
60716072
});
6073+
60726074
// Two words wrapped, so the with is the width of the longest word.
60736075
try eq(401, @round(label.rect.width)); // Label has 401 as maximum
60746076
try eq(500, @trunc(panel.rect.width));

0 commit comments

Comments
 (0)