mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-29 16:39:34 +08:00
Merge dom and component focus (#978)
Instead of two levels of focus with `focus` and `selected`, use a recursive level. The components set the one "active" and hbox/vbox/dbox Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
@@ -30,6 +30,17 @@ Box Box::Union(Box a, Box b) {
|
||||
};
|
||||
}
|
||||
|
||||
/// Shift the box by (x,y).
|
||||
/// @param x horizontal shift.
|
||||
/// @param y vertical shift.
|
||||
/// @ingroup screen
|
||||
void Box::Shift(int x, int y) {
|
||||
x_min += x;
|
||||
x_max += x;
|
||||
y_min += y;
|
||||
y_max += y;
|
||||
}
|
||||
|
||||
/// @return whether (x,y) is contained inside the box.
|
||||
/// @ingroup screen
|
||||
bool Box::Contain(int x, int y) const {
|
||||
|
Reference in New Issue
Block a user