Exemplo n.º 1
0
        internal static int ProcessWndProc(SDL.SDL_Event *e)
        {
            int result = 0;

            foreach (Plugin plugin in Plugins)
            {
                result |= plugin._on_wnd_proc?.Invoke(e) ?? 0;
            }

            return(result);
        }
Exemplo n.º 2
0
 private static unsafe int SDLEventWatcher(IntPtr func, IntPtr evtPtr)
 {
     SDL.SDL_Event *evt = (SDL.SDL_Event *)evtPtr;
     if (evt->type == SDL.SDL_EventType.SDL_MOUSEBUTTONDOWN)
     {
         // Mouse was clicked!
         var ms = Mouse.GetState();
         sInstance.spriteList.Add(new LameSprite(ms.X, ms.Y, Color.Blue));
     }
     else if (evt->type == SDL.SDL_EventType.SDL_MOUSEBUTTONUP)
     {
         // Mouse was released!
     }
     return(0);            // This doesn't matter like it would for SetEventFilter
 }