margin
Get the margin needed to align this id's left edge.
Parameters
- self:*Alignment
- *Alignment
- id:Id
- Id
Source
Implementation
pub fn margin(self: *Alignment, id: Id) Rect {
if (self.max) |m| {
if (dvui.dataGet(null, id, "_align", f32)) |a| {
return .{ .x = @max(0, (m - a) / self.scale) };
}
}
return .{};
}