diff --git a/src/ui/bigtext/selectionPos.py b/src/ui/bigtext/selectionPos.py new file mode 100644 index 0000000..58258a0 --- /dev/null +++ b/src/ui/bigtext/selectionPos.py @@ -0,0 +1,11 @@ +class SelectionPos: + def __init__(self, index: int, is_in_left_half: bool, num_bytes_of_char: int): + self.index = index + self.is_in_left_half = is_in_left_half + self.num_bytes_of_char = num_bytes_of_char + + def __repr__(self): + return f"{self.index}{'🞀' if self.is_in_left_half else '🞂'}({self.num_bytes_of_char})" + + def pos(self): + return self.index + (0 if self.is_in_left_half else self.num_bytes_of_char)