This commit is contained in:
shenjack-mac 2023-02-02 22:44:24 +08:00
parent ffe468b00b
commit ee30cf90bf
2 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ class SR1ShipRender(BaseScreen):
self.parts_sprite: Dict[int, Sprite] = {} self.parts_sprite: Dict[int, Sprite] = {}
if DR_option.use_DR_rust: if DR_option.use_DR_rust:
self.camera_rs = Camera_rs(main_window, self.camera_rs = Camera_rs(main_window,
min_zoom=(1/2) ** 4, max_zoom=1 << 5) min_zoom=(1/2) ** 4, max_zoom=10)
self.rust_parts = None self.rust_parts = None
def load_xml(self, file_path: str) -> bool: def load_xml(self, file_path: str) -> bool:
@ -238,7 +238,7 @@ class SR1ShipRender(BaseScreen):
mouse_dx = x - (self.window_pointer.width / 2) mouse_dx = x - (self.window_pointer.width / 2)
mouse_dy = y - (self.window_pointer.height / 2) mouse_dy = y - (self.window_pointer.height / 2)
self.debug_mouse_line.x2, self.debug_mouse_line.y2 = x, y self.debug_mouse_line.x2, self.debug_mouse_line.y2 = x, y
if self.scale * (0.5**scroll_y) < 10: if self.camera_rs.zoom * (0.5**scroll_y) < 10:
self.camera_rs.zoom = self.camera_rs.zoom * (0.5 ** scroll_y) self.camera_rs.zoom = self.camera_rs.zoom * (0.5 ** scroll_y)
self.camera_rs.dx += (mouse_dx - self.camera_rs.dx) * (1 - (0.5 ** scroll_y)) self.camera_rs.dx += (mouse_dx - self.camera_rs.dx) * (1 - (0.5 ** scroll_y))
self.camera_rs.dy += (mouse_dy - self.camera_rs.dy) * (1 - (0.5 ** scroll_y)) self.camera_rs.dy += (mouse_dy - self.camera_rs.dy) * (1 - (0.5 ** scroll_y))

View File

@ -8,8 +8,8 @@ fonts_folder = "libs/fonts"
[window] [window]
style = "None" style = "None"
width = 2336 width = 1439
height = 1621 height = 969
visible = true visible = true
gui_scale = 1 gui_scale = 1
caption = "Difficult Rocket v{DR_version}|DR_rs v{DR_Rust_get_version}" caption = "Difficult Rocket v{DR_version}|DR_rs v{DR_Rust_get_version}"