#1 Add irr::EET_WINDOW_RESIZE_EVENT

Offen
CYBERDEViL möchte 2 Commits von CYBERDEViL/resize_event nach CYBERDEViL/dev zusammenführen
2 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen
  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;