Class ReloadResult

java.lang.Object
dev.xichil.mvui.ReloadResult

public final class ReloadResult extends Object
What GameBridge.reloadOptions() could not apply in the running game: the options that take effect only after a restart. Immutable. A menu shows these to the player, e.g. "Restart to apply: fullscreenResolution".
  • Method Details

    • applied

      public static ReloadResult applied()
      Everything was applied live; needsRestart() is false.
      Returns:
      the shared "applied" result
    • needsRestart

      public static ReloadResult needsRestart(String... options)
      These options apply only after a restart. Used by backends.
      Parameters:
      options - options.txt keys, e.g. fullscreenResolution, or options.txt for the whole file; duplicates are dropped, order is kept
      Returns:
      the result; applied() if options is empty
    • needsRestart

      public boolean needsRestart()
      Whether some options take effect only after a restart (restartOptions() is not empty).
      Returns:
      true if at least one option needs a restart to take effect
    • restartOptions

      public Set<String> restartOptions()
      The options that take effect only after a restart, as options.txt keys; options.txt itself if nothing could be applied.
      Returns:
      an unmodifiable set in the backend's order; empty if everything was applied