Browse Source

precreate flags hook event

dm 8 years ago
parent
commit
e11ea0b3a7
2 changed files with 12 additions and 1 deletions
  1. 4 1
      oxygine/src/oxygine/core/oxygine.cpp
  2. 8 0
      oxygine/src/oxygine/core/oxygine.h

+ 4 - 1
oxygine/src/oxygine/core/oxygine.cpp

@@ -318,9 +318,12 @@ namespace oxygine
                 flags |= SDL_WINDOW_FULLSCREEN;
 
 
-            Event ev(EVENT_PRECREATEWINDOW);
+            PreCreateWindowEvent ev;
+			ev.flags = flags;
             _dispatcher->dispatchEvent(&ev);
 
+			flags = ev.flags;
+
 
 #if TARGET_OS_IPHONE
             //ios bug workaround

+ 8 - 0
oxygine/src/oxygine/core/oxygine.h

@@ -1,6 +1,7 @@
 #pragma once
 #include "../oxygine-include.h"
 #include "../EventDispatcher.h"
+#include "../Event.h"
 #include "../math/Vector2.h"
 #include <string>
 
@@ -137,6 +138,13 @@ namespace oxygine
             EVENT_EXIT = sysEventID('c', 'E', 'x'), //dispatched from core::release
         };
 
+		class PreCreateWindowEvent : public Event
+		{
+		public:
+			PreCreateWindowEvent():Event(EVENT_PRECREATEWINDOW){}
+			int flags;
+		};
+
         spEventDispatcher getDispatcher();
 
         void init0();