статистика времени кадра
This commit is contained in:
@@ -175,6 +175,7 @@ pub fn leftPanel(ctx: *WindowContext) void {
|
||||
if (dvui.checkbox(@src(), &canvas.draw_document, "Draw document", .{})) {
|
||||
canvas.requestRedraw();
|
||||
}
|
||||
if (dvui.checkbox(@src(), &canvas.show_render_stats, "Show stats", .{})) {}
|
||||
if (!canvas.draw_document) {
|
||||
if (dvui.button(@src(), if (doc.cpu_render.type == .Gradient) "Gradient" else "Squares", .{}, .{})) {
|
||||
if (doc.cpu_render.type == .Gradient) {
|
||||
@@ -188,6 +189,9 @@ pub fn leftPanel(ctx: *WindowContext) void {
|
||||
if (dvui.button(@src(), "Add random shapes", .{}, .{})) {
|
||||
canvas.addRandomShapes() catch {};
|
||||
}
|
||||
if (dvui.button(@src(), "Request redraw", .{}, .{})) {
|
||||
canvas.requestRedraw();
|
||||
}
|
||||
} else {
|
||||
dvui.label(@src(), "No document", .{}, .{});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user