Ejemplo n.º 1
0
        protected virtual void OnWindowCreated()
        {
            WindowCreated?.Invoke(this, EventArgs.Empty);

            // If we still have default values, let's set these based on SDL refresh rate (if we can)
            if (gamePlatform.MainWindow is GameWindowSDL)
            {
                if (TargetElapsedTime == defaultTimeSpan)
                {
                    ((GameWindowSDL)gamePlatform.MainWindow).GetDisplayInformation(out int width, out int height, out int refresh_rate);
                    TargetElapsedTime = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / refresh_rate);
                }
                if (WindowMinimumUpdateRate.MinimumElapsedTime == defaultTimeSpan)
                {
                    WindowMinimumUpdateRate.MinimumElapsedTime = TargetElapsedTime;
                }
            }
            else if (TargetElapsedTime == defaultTimeSpan)
            {
                TargetElapsedTime = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / 60); // target elapsed time is by default 60Hz
            }
        }
Ejemplo n.º 2
0
        public TextureSceneView createTextureSceneView(String name, Vector3 translation, Vector3 lookAt, int width, int height)
        {
            OrbitCameraController orbitCamera = new OrbitCameraController(translation, lookAt, Vector3.Zero, Vector3.Zero, 0, 1000);

            orbitCamera.AllowRotation = AllowRotation;
            orbitCamera.AllowZoom     = AllowZoom;

            TextureSceneView window = new TextureSceneView(this, orbitCamera, name, background, 0, width, height);

            if (WindowCreated != null)
            {
                WindowCreated.Invoke(window);
            }
            if (camerasCreated)
            {
                window.createSceneView(currentScene);
            }

            textureWindows.Add(window);

            return(window);
        }
Ejemplo n.º 3
0
 public WindowBase()
 {
     DataContext = this;
     WindowCreated?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 4
0
 protected virtual void OnWindowCreated()
 {
     WindowCreated?.Invoke(this, EventArgs.Empty);
 }
 /// <summary>
 /// Raises the WindowCreated event.
 /// </summary>
 /// <param name="window">The window that was created.</param>
 protected void OnWindowCreated(IUltravioletWindow window) =>
 WindowCreated?.Invoke(window);
Ejemplo n.º 6
0
 ///<summary>Invokes registered user-defined handler methods after the native window is created.</summary>
 internal void OnWindowCreated()
 {
     WindowCreated?.Invoke(this, null);
 }
Ejemplo n.º 7
0
 private static void WindowCreatedEvent(ShellHook ShellObject, IntPtr hWnd)
 {
     WindowCreated?.Invoke(ShellObject, hWnd);
 }
Ejemplo n.º 8
0
 private void HandleWindowAdd(WindowsWindow window, bool firstCreate)
 {
     WindowCreated?.Invoke(window, firstCreate);
 }
 /// <summary>
 /// Raises the WindowCreated event.
 /// </summary>
 /// <param name="window">The window that was created.</param>
 private void OnWindowCreated(IUltravioletWindow window) =>
 WindowCreated?.Invoke(window);
Ejemplo n.º 10
0
 private void RaiseWindowCreatedEvent(Window window)
 {
     WindowCreated?.Invoke(this, new WindowEventArgs(window));
 }
Ejemplo n.º 11
0
 public void OnWindowCreated(WindowCreated windowCreated)
 {
     creator = windowCreated.Creator;
     Debug.Log("Creator = " + creator.name);
 }
Ejemplo n.º 12
0
 private void WindowCreatedEvent(ShellEventHook shellObject, IntPtr hWnd)
 {
     WindowCreated?.Invoke(shellObject, hWnd);
 }
 public void OnWindowCreated(WindowCreatedEventArgs e)
 {
     EventDispatcher.Dispatch(() => WindowCreated?.Invoke(this, e));
 }