Class Lwjgl3WindowConfiguration

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setAutoIconify​(boolean autoIconify)  
      void setDecorated​(boolean decorated)  
      void setFullscreenMode​(com.badlogic.gdx.Graphics.DisplayMode mode)
      Sets the app to use fullscreen mode.
      void setInitialBackgroundColor​(com.badlogic.gdx.graphics.Color color)
      Sets the initial background color.
      void setInitialVisible​(boolean visibility)  
      void setMaximized​(boolean maximized)  
      void setMaximizedMonitor​(com.badlogic.gdx.Graphics.Monitor monitor)  
      void setResizable​(boolean resizable)  
      void setTitle​(java.lang.String title)
      Sets the window title.
      void setWindowedMode​(int width, int height)
      Sets the app to use windowed mode.
      void setWindowIcon​(com.badlogic.gdx.Files.FileType fileType, java.lang.String... filePaths)
      Sets the icon that will be used in the window's title bar.
      void setWindowIcon​(java.lang.String... filePaths)
      Sets the icon that will be used in the window's title bar.
      void setWindowListener​(Lwjgl3WindowListener windowListener)
      Sets the Lwjgl3WindowListener which will be informed about iconficiation, focus loss and window close events.
      void setWindowPosition​(int x, int y)
      Sets the position of the window in windowed mode.
      void setWindowSizeLimits​(int minWidth, int minHeight, int maxWidth, int maxHeight)
      Sets minimum and maximum size limits for the window.
      void useVsync​(boolean vsync)
      Sets whether to use vsync.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Lwjgl3WindowConfiguration

        public Lwjgl3WindowConfiguration()
    • Method Detail

      • setInitialVisible

        public void setInitialVisible​(boolean visibility)
        Parameters:
        visibility - whether the window will be visible on creation. (default true)
      • setWindowedMode

        public void setWindowedMode​(int width,
                                    int height)
        Sets the app to use windowed mode.
        Parameters:
        width - the width of the window (default 640)
        height - the height of the window (default 480)
      • setResizable

        public void setResizable​(boolean resizable)
        Parameters:
        resizable - whether the windowed mode window is resizable (default true)
      • setDecorated

        public void setDecorated​(boolean decorated)
        Parameters:
        decorated - whether the windowed mode window is decorated, i.e. displaying the title bars (default true)
      • setMaximized

        public void setMaximized​(boolean maximized)
        Parameters:
        maximized - whether the window starts maximized. Ignored if the window is full screen. (default false)
      • setMaximizedMonitor

        public void setMaximizedMonitor​(com.badlogic.gdx.Graphics.Monitor monitor)
        Parameters:
        monitor - what monitor the window should maximize to
      • setAutoIconify

        public void setAutoIconify​(boolean autoIconify)
        Parameters:
        autoIconify - whether the window should automatically iconify and restore previous video mode on input focus loss. (default true) Does nothing in windowed mode.
      • setWindowPosition

        public void setWindowPosition​(int x,
                                      int y)
        Sets the position of the window in windowed mode. Default -1 for both coordinates for centered on primary monitor.
      • setWindowSizeLimits

        public void setWindowSizeLimits​(int minWidth,
                                        int minHeight,
                                        int maxWidth,
                                        int maxHeight)
        Sets minimum and maximum size limits for the window. If the window is full screen or not resizable, these limits are ignored. The default for all four parameters is -1, which means unrestricted.
      • setWindowIcon

        public void setWindowIcon​(java.lang.String... filePaths)
        Sets the icon that will be used in the window's title bar. Has no effect in macOS, which doesn't use window icons.
        Parameters:
        filePaths - One or more internal image paths. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.
      • setWindowIcon

        public void setWindowIcon​(com.badlogic.gdx.Files.FileType fileType,
                                  java.lang.String... filePaths)
        Sets the icon that will be used in the window's title bar. Has no effect in macOS, which doesn't use window icons.
        Parameters:
        fileType - The type of file handle the paths are relative to.
        filePaths - One or more image paths, relative to the given Files.FileType. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.
      • setWindowListener

        public void setWindowListener​(Lwjgl3WindowListener windowListener)
        Sets the Lwjgl3WindowListener which will be informed about iconficiation, focus loss and window close events.
      • setFullscreenMode

        public void setFullscreenMode​(com.badlogic.gdx.Graphics.DisplayMode mode)
        Sets the app to use fullscreen mode. Use the static methods like Lwjgl3ApplicationConfiguration.getDisplayMode() on this class to enumerate connected monitors and their fullscreen display modes.
      • setTitle

        public void setTitle​(java.lang.String title)
        Sets the window title. If null, the application listener's class name is used.
      • setInitialBackgroundColor

        public void setInitialBackgroundColor​(com.badlogic.gdx.graphics.Color color)
        Sets the initial background color. Defaults to black.
      • useVsync

        public void useVsync​(boolean vsync)
        Sets whether to use vsync. This setting can be changed anytime at runtime via Graphics.setVSync(boolean). For multi-window applications, only one (the main) window should enable vsync. Otherwise, every window will wait for the vertical blank on swap individually, effectively cutting the frame rate to (refreshRate / numberOfWindows).