Class PlatformInit

java.lang.Object
com.xebisco.yield.PlatformInit
All Implemented Interfaces:
Serializable

public class PlatformInit extends Object implements Serializable
PlatformInit is a class that represents the platform initialization settings.
See Also:
  • Field Details

    • PC_DEFAULT

      public static final ApplicationModule[] PC_DEFAULT
      The PC_DEFAULT static array in the PlatformInit class serves as a predefined set of required platform modules for the PC platform. These platform modules are essential components that are needed to initialize and run the application on a PC.
  • Constructor Details

    • PlatformInit

      public PlatformInit(ApplicationModule[] requiredPlatformModules)
      Constructs a new instance of PlatformInit with the specified required platform modules.
      Parameters:
      requiredPlatformModules - the required platform modules
  • Method Details

    • viewportSize

      public Vector2D viewportSize()
      Gets the initial viewport size.
      Returns:
      the initial viewport size
    • setViewportSize

      public PlatformInit setViewportSize(Vector2D viewportSize)
      Sets the initial viewport size.
      Parameters:
      viewportSize - the new viewport size
      Returns:
      this instance for method chaining
    • windowSize

      public Vector2D windowSize()
      Gets the initial window size.
      Returns:
      the initial window size
    • setWindowSize

      public PlatformInit setWindowSize(Vector2D windowSize)
      Sets the initial window size.
      Parameters:
      windowSize - the new window size
      Returns:
      this instance for method chaining
    • title

      public String title()
      Gets the initial window title.
      Returns:
      the initial window title
    • setTitle

      public PlatformInit setTitle(String title)
      Sets the initial window title.
      Parameters:
      title - the new window title
      Returns:
      this instance for method chaining
    • fullscreen

      public boolean fullscreen()
      Gets whether the window should be in fullscreen mode.
      Returns:
      whether the window should be in fullscreen mode
    • setFullscreen

      public PlatformInit setFullscreen(boolean fullscreen)
      Sets whether the window should be in fullscreen mode.
      Parameters:
      fullscreen - whether the window should be in fullscreen mode
      Returns:
      this instance for method chaining
    • undecorated

      public boolean undecorated()
      Gets whether the window should be undecorated.
      Returns:
      whether the window should be undecorated
    • setUndecorated

      public PlatformInit setUndecorated(boolean undecorated)
      Sets whether the window should be undecorated.
      Parameters:
      undecorated - whether the window should be undecorated
      Returns:
      this instance for method chaining
    • stretchViewport

      public boolean stretchViewport()
      Gets whether the viewport should be stretched to fit the window.
      Returns:
      whether the viewport should be stretched to fit the window
    • setStretchViewport

      public PlatformInit setStretchViewport(boolean stretchViewport)
      Sets whether the viewport should be stretched to fit the window.
      Parameters:
      stretchViewport - whether the viewport should be stretched to fit the window
      Returns:
      this instance for method chaining
    • invertZIndex

      public boolean invertZIndex()
      Gets whether the Z-index should be inverted.
      Returns:
      whether the Z-index should be inverted
    • setInvertZIndex

      public PlatformInit setInvertZIndex(boolean invertZIndex)
      Sets whether the Z-index should be inverted.
      Parameters:
      invertZIndex - whether the Z-index should be inverted
      Returns:
      this instance for method chaining
    • verticalSync

      public boolean verticalSync()
      Gets whether vertical synchronization should be enabled.
      Returns:
      whether vertical synchronization should be enabled
    • setVerticalSync

      public PlatformInit setVerticalSync(boolean verticalSync)
      Sets whether vertical synchronization should be enabled.
      Parameters:
      verticalSync - whether vertical synchronization should be enabled
      Returns:
      this instance for method chaining
    • windowIconPath

      public String windowIconPath()
      Gets the path to the window icon.
      Returns:
      the path to the window icon
    • setWindowIconPath

      public PlatformInit setWindowIconPath(String windowIconPath)
      Sets the path to the window icon.
      Parameters:
      windowIconPath - the new path to the window icon
      Returns:
      this instance for method chaining
    • requiredPlatformModules

      public ApplicationModule[] requiredPlatformModules()
      Gets the required platform modules.
      Returns:
      the required platform modules