Adjusted InputEvent in Window.

This commit is contained in:
hyzboy 2025-03-06 01:21:31 +08:00
parent aa7abe4763
commit 67e8e95665
2 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@
namespace hgl
{
class Window:io::WindowEvent
class Window:public io::WindowEvent
{
protected:
@ -21,8 +21,13 @@ namespace hgl
protected:
/**
* <br>
* Windows平台WindowProc函数传递过来的
* io::WindowEvent的对象指针<br>
* Event是要放在外面的
*/
io::InputEvent input_event;
io::InputEvent sub_input_event;
void OnResize(uint,uint) override;
void OnActive(bool) override;
@ -41,9 +46,6 @@ namespace hgl
Window(const OSString &);
virtual ~Window()=default;
bool Join(InputEvent *ie){return sub_input_event.Join(ie);}
bool Unjoin(InputEvent *ie){return sub_input_event.Unjoin(ie);}
virtual bool Create(uint,uint)=0;
virtual bool Create(uint,uint,uint)=0;
virtual void Close()=0;

View File

@ -12,7 +12,6 @@ namespace hgl
is_min=false;
input_event.Join(this);
input_event.Join(&sub_input_event);
}
void Window::OnResize(uint w,uint h)