Convert a relative, normalized position to an absolute position For example (0, 0) to get the top left, (1, 1) to get the bottom right position of the UI element.
(self, rel_x, rel_y)
| 80 | self.size = size |
| 81 | |
| 82 | def position_abs(self, rel_x, rel_y): |
| 83 | """ |
| 84 | Convert a relative, normalized position to an absolute position |
| 85 | |
| 86 | For example (0, 0) to get the top left, (1, 1) to get the bottom |
| 87 | right position of the UI element. |
| 88 | """ |
| 89 | return (self.pos[0] + self.size[0] * rel_x, self.pos[1] + self.size[1] * rel_y) |
| 90 | |
| 91 | @property |
| 92 | def center_abs(self): |
no outgoing calls
no test coverage detected