DVUI

setCurrent

Return the previous current values

Parameters

#
self:*Subwindows
*Subwindows
id:Id
Id
rect:?Rect.Natural
?Rect.Natural

Source

Implementation

#
pub fn setCurrent(self: *Subwindows, id: Id, rect: ?Rect.Natural) struct { Id, Rect.Natural } {
    defer { // Set the new values after returning the previous
        self.current_id = id;
        if (rect) |r| self.current_rect = r;
    }
    return .{ self.current_id, self.current_rect };
}