use ui::{floating::{self, Floating}, stats::{self, Stats}};
// in the view's constructor
meter: cx.new(Stats::new),
meter_at: Floating::new(Painter::of(cx)),
// in render, inside a relative() container
let home = point(viewport.width - px(stats::WIDTH + 16.0), px(16.0));
floating::panel("meter", &self.meter_at, home, self.meter.clone())- A window at rest reads
0FPS. The meter's own two draws a second are not counted; its CPU cost is. - One meter per window.
- CPU, GPU and MEM read
—where the platform does not report them, the web build included. - Placement is the caller's;
floating::panelmakes it draggable.