#1 Add irr::EET_WINDOW_RESIZE_EVENT

Otwarty
CYBERDEViL chce scalić 2 commity/ów z CYBERDEViL/resize_event do CYBERDEViL/dev
2 zmienionych plików z 11 dodań i 3 usunięć
  1. 4 1
      include/IEventReceiver.h
  2. 7 2
      source/Irrlicht/CIrrDeviceLinux.cpp

+ 4 - 1
include/IEventReceiver.h

@@ -65,7 +65,10 @@ namespace irr
 			cast to s32 and used as UserData1 and UserData2.
 		MacOS: Not yet implemented
 		*/
-		EET_USER_EVENT,
+		EET_USER_EVENT,
+
+		//! The window was resized by the user.
+		EET_WINDOW_RESIZE_EVENT,
 
 		//! This enum is never used, it only forces the compiler to
 		//! compile these enumeration values to 32 bit.

+ 7 - 2
source/Irrlicht/CIrrDeviceLinux.cpp

@@ -803,8 +803,13 @@ bool CIrrDeviceLinux::run()
 							SoftwareImage->data = (char*) malloc(SoftwareImage->bytes_per_line * SoftwareImage->height * sizeof(char));
 					}
 
-					if (VideoDriver)
-						VideoDriver->OnResize(core::dimension2d<u32>(Width, Height));
+					if (VideoDriver)
+					{
+						VideoDriver->OnResize(core::dimension2d<u32>(Width, Height));
+
+						irrevent.EventType = irr::EET_WINDOW_RESIZE_EVENT;
+						postEventFromUser(irrevent);
+					}
 				}
 				break;