MacOS compat and version bump

This commit is contained in:
沈瑗杰 2023-01-21 11:48:07 +08:00
parent e72d041013
commit ca8ef52d59
3 changed files with 11 additions and 3 deletions

View File

@ -57,6 +57,9 @@ class Client:
self.net_mode = net_mode
self.caption = tools.name_handler(self.config['window']['caption'],
{'version': self.config['runtime']['version']})
file_drop = True
if pyglet.compat_platform == 'darwin':
file_drop = False
self.window = ClientWindow(net_mode=self.net_mode,
width=int(self.config['window']['width']),
height=int(self.config['window']['height']),
@ -64,7 +67,7 @@ class Client:
caption=self.caption,
resizable=tools.format_bool(self.config['window']['resizable']),
visible=tools.format_bool(self.config['window']['visible']),
file_drops=True)
file_drops=file_drop)
self.logger.info(tr.lang('client', 'setup.done'))
end_time = time.time_ns()
self.use_time = end_time - start_time

View File

@ -20,7 +20,7 @@ from pyglet.graphics import Batch, Group
# Difficult Rocket
from Difficult_Rocket import DR_option
from Difficult_Rocket.api.types import Fonts
# from Difficult_Rocket.command.line import CommandText
from Difficult_Rocket.command.line import CommandText
from Difficult_Rocket.client.screen import BaseScreen
from Difficult_Rocket.api.types.SR1 import SR1Textures, SR1PartTexture, SR1PartData, SR1Rotation, xml_bool
@ -159,6 +159,11 @@ class SR1ShipRender(BaseScreen):
self.scale += scroll_y * 0.1
self.update_parts()
def on_command(self, command: CommandText):
if command.match('render'):
# self.render_ship()
print('应该渲染飞船的')
def on_mouse_drag(self, x: int, y: int, dx: int, dy: int, buttons: int, modifiers: int):
if not self.focus:
return

View File

@ -1,6 +1,6 @@
[runtime]
fps = 60
version = "0.6.4.2"
version = "0.6.5.0"
language = "zh-CN"
date_fmt = "%Y-%m-%d %H-%M-%S"
write_py_v = "3.8.10"