🐛 Fix problem with reverse config in flex

This commit is contained in:
alonso.torres 2025-03-07 09:23:07 +01:00
parent 97fb1e00c2
commit ba4554da79
3 changed files with 16 additions and 8 deletions

View file

@ -9,14 +9,18 @@ pub enum Layout {
#[derive(Debug, Clone, PartialEq)]
pub enum Direction {
Row,
RowReverse,
Column,
ColumnReverse,
}
impl Direction {
pub fn from_u8(value: u8) -> Self {
match value {
0 => Self::Row,
1 => Self::Column,
1 => Self::RowReverse,
2 => Self::Column,
3 => Self::ColumnReverse,
_ => unreachable!(),
}
}