甚至更新了!
This commit is contained in:
parent
49ac2b9d29
commit
aeeb5e46c2
@ -38,11 +38,13 @@ class Camera:
|
|||||||
max_zoom: Optional[float] = 1.0,
|
max_zoom: Optional[float] = 1.0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.window = window
|
self.window = window
|
||||||
self.dx = dx
|
self.dx = dx or 1.0
|
||||||
self.dy = dy
|
self.dy = dy or 1.0
|
||||||
self.zoom = zoom
|
|
||||||
self.min_zoom = min_zoom
|
self.zoom = zoom or 1.0
|
||||||
self.max_zoom = max_zoom
|
self.min_zoom = min_zoom or 1.0
|
||||||
|
self.max_zoom = max_zoom or 1.0
|
||||||
|
|
||||||
self._stored_view = window.view
|
self._stored_view = window.view
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -140,11 +142,11 @@ class GroupCamera(Group):
|
|||||||
self._window = window
|
self._window = window
|
||||||
self._previous_view = None
|
self._previous_view = None
|
||||||
|
|
||||||
self._view_x = view_x
|
self._view_x = view_x or 0
|
||||||
self._view_y = view_y
|
self._view_y = view_y or 0
|
||||||
self._zoom = zoom
|
self._zoom = zoom or 1.0
|
||||||
self.min_zoom = min_zoom
|
self.min_zoom = min_zoom or 1.0
|
||||||
self.max_zoom = max_zoom
|
self.max_zoom = max_zoom or 1.0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def view_x(self) -> int:
|
def view_x(self) -> int:
|
||||||
@ -233,13 +235,15 @@ class CenterGroupFrame(Group):
|
|||||||
):
|
):
|
||||||
super().__init__(order=order, parent=parent)
|
super().__init__(order=order, parent=parent)
|
||||||
self.window = window
|
self.window = window
|
||||||
self.dx = dx
|
self.dx = dx or 0
|
||||||
self.dy = dy
|
self.dy = dy or 0
|
||||||
self._width = width
|
|
||||||
self._height = height
|
self._width = width or 0
|
||||||
self._zoom = zoom
|
self._height = height or 0
|
||||||
self.min_zoom = min_zoom
|
|
||||||
self.max_zoom = max_zoom
|
self._zoom = zoom or 1.0
|
||||||
|
self.min_zoom = min_zoom or 1.0
|
||||||
|
self.max_zoom = max_zoom or 1.0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def zoom(self) -> float:
|
def zoom(self) -> float:
|
||||||
|
Loading…
Reference in New Issue
Block a user