Class ApiCallConfirmWindow

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Layout, IScreen

public class ApiCallConfirmWindow extends GenericDialog
Confirmation dialog for scripting API calls received through the gaiasky:// protocol handler. Any web page can trigger a gaiasky:// URL (via a link, iframe, or redirect), so reflective API calls are only executed after the user has explicitly accepted them.

Dataset downloads through gaiasky://load use DatasetUrlConfirmWindow instead.

  • Constructor Details

    • ApiCallConfirmWindow

      public ApiCallConfirmWindow(String apiUrl, String call, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, com.badlogic.gdx.scenes.scene2d.Stage stage, Runnable onAccept, Runnable onCancel)
      Creates the confirmation dialog.
      Parameters:
      apiUrl - The full URL that triggered the call.
      call - The API call, e.g. "camera/go_to_object".
      skin - The UI skin.
      stage - The UI stage.
      onAccept - Runnable to run if the user accepts.
      onCancel - Runnable to run if the user cancels.
  • Method Details

    • build

      protected void build()
      Description copied from class: GenericDialog
      Build the content here.
      Specified by:
      build in class GenericDialog
    • accept

      protected boolean accept()
      Description copied from class: GenericDialog
      The accept function, if any.
      Specified by:
      accept in class GenericDialog
      Returns:
      True if the dialog must close after the call, false otherwise.
    • cancel

      protected void cancel()
      Description copied from class: GenericDialog
      The cancel function, if any.
      Specified by:
      cancel in class GenericDialog
    • dispose

      public void dispose()
      Specified by:
      dispose in class GenericDialog