add onresize
This commit is contained in:
parent
479b19d182
commit
9cef45c426
@ -2,7 +2,7 @@ use std::num::NonZeroIsize;
|
||||
|
||||
use pollster::block_on;
|
||||
use raw_window_handle::{RawWindowHandle, Win32WindowHandle};
|
||||
use wgpu::{Adapter, Device, Gles3MinorVersion, Instance, InstanceDescriptor, Queue, Surface, SurfaceTargetUnsafe};
|
||||
use wgpu::{Adapter, Device, Instance, InstanceDescriptor, Queue, Surface, SurfaceTargetUnsafe};
|
||||
|
||||
/// 定义一个结构体保存所有渲染上下文
|
||||
#[derive(Debug)]
|
||||
|
@ -89,6 +89,10 @@ class Menu(BaseScreen):
|
||||
main_window.push_handlers(self.enter_ship_editor_button)
|
||||
main_window.push_handlers(self.magic_rust_test_button)
|
||||
|
||||
def on_resize(self, width, height, window: ClientWindow):
|
||||
if self.hacks is not None:
|
||||
self.hacks.on_resize(width, height)
|
||||
|
||||
def on_draw(self, window: ClientWindow):
|
||||
self.main_batch.draw()
|
||||
if self.hacks is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user