fix: propagate configured frame rate to widgets
This commit is contained in:
parent
87addc97de
commit
03cdcd260e
3 changed files with 3 additions and 4 deletions
|
@ -32,8 +32,7 @@ const idle_msg = "🐶";
|
|||
pub const width = idle_msg.len + 20;
|
||||
|
||||
pub fn create(allocator: Allocator, parent: Plane, _: ?Widget.EventHandler) @import("widget.zig").CreateError!Widget {
|
||||
var frame_rate = tp.env.get().num("frame-rate");
|
||||
if (frame_rate == 0) frame_rate = 60;
|
||||
const frame_rate = tp.env.get().num("frame-rate");
|
||||
const self: *Self = try allocator.create(Self);
|
||||
self.* = .{
|
||||
.plane = try Plane.init(&(Widget.Box{}).opts(@typeName(Self)), parent),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue