on resize
This commit is contained in:
parent
c3e40a9566
commit
97e0a569bb
@ -7,8 +7,8 @@ fonts_folder = "libs/fonts"
|
|||||||
|
|
||||||
[window]
|
[window]
|
||||||
style = "None"
|
style = "None"
|
||||||
width = 1094
|
width = 1041
|
||||||
height = 1173
|
height = 1050
|
||||||
visible = true
|
visible = true
|
||||||
gui_scale = 1
|
gui_scale = 1
|
||||||
caption = "Difficult Rocket v{DR_version}"
|
caption = "Difficult Rocket v{DR_version}"
|
||||||
|
@ -123,7 +123,7 @@ class SR1ShipRender(BaseScreen):
|
|||||||
self.part_box_batch = Batch()
|
self.part_box_batch = Batch()
|
||||||
self.part_batch = Batch()
|
self.part_batch = Batch()
|
||||||
self.part_group = Group()
|
self.part_group = Group()
|
||||||
self.debug_label = Label(x=20, y=main_window.height - 50, font_size=DR_status.std_font_size,
|
self.debug_label = Label(x=20, y=main_window.height - 100, font_size=DR_status.std_font_size,
|
||||||
text='SR1 render!', font_name=Fonts.微软等宽无线,
|
text='SR1 render!', font_name=Fonts.微软等宽无线,
|
||||||
width=main_window.width - 20, height=20,
|
width=main_window.width - 20, height=20,
|
||||||
anchor_x='left', anchor_y='top')
|
anchor_x='left', anchor_y='top')
|
||||||
@ -220,9 +220,6 @@ class SR1ShipRender(BaseScreen):
|
|||||||
self.drawing = False
|
self.drawing = False
|
||||||
raise GeneratorExit
|
raise GeneratorExit
|
||||||
|
|
||||||
def on_resize(self, width: int, height: int, window: "ClientWindow"):
|
|
||||||
self.debug_label.y = height - 50
|
|
||||||
|
|
||||||
def render_ship(self):
|
def render_ship(self):
|
||||||
if self.textures is None:
|
if self.textures is None:
|
||||||
self.load_textures()
|
self.load_textures()
|
||||||
@ -303,6 +300,7 @@ class SR1ShipRender(BaseScreen):
|
|||||||
self.debug_mouse_delta_line.draw()
|
self.debug_mouse_delta_line.draw()
|
||||||
|
|
||||||
def on_resize(self, width: int, height: int, window: "ClientWindow"):
|
def on_resize(self, width: int, height: int, window: "ClientWindow"):
|
||||||
|
self.debug_label.y = height - 100
|
||||||
if not self.rendered:
|
if not self.rendered:
|
||||||
return
|
return
|
||||||
self.debug_line.x = width / 2
|
self.debug_line.x = width / 2
|
||||||
|
Loading…
Reference in New Issue
Block a user