drawCursor
Parameters
- self:*TextEntryWidget
- *TextEntryWidget
Source
Implementation
pub fn drawCursor(self: *TextEntryWidget) void {
var sel = self.textLayout.selectionGet(self.len);
if (sel.empty()) {
// the cursor can be slightly outside the textLayout clip
dvui.clipSet(self.scrollClip);
var crect = self.textLayout.cursor_rect.plus(.{ .x = -1 });
crect.w = 2;
self.textLayout.screenRectScale(crect).r.fill(.{}, .{ .color = dvui.themeGet().focus, .fade = 1.0 });
}
}