Class OptionDialogue

java.lang.Object
com.skloch.game.OptionDialogue

public class OptionDialogue extends Object
Deprecated.
Creates a small window to recieve a yes/no response from the player No longer used, but the code may still be useful
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) boolean
    Deprecated.
     
    private com.badlogic.gdx.scenes.scene2d.ui.Label
    Deprecated.
     
    com.badlogic.gdx.scenes.scene2d.ui.Label
    Deprecated.
     
    private com.badlogic.gdx.scenes.scene2d.ui.Label
    Deprecated.
     
    private SoundManager
    Deprecated.
     
    (package private) boolean
    Deprecated.
     
    private com.badlogic.gdx.scenes.scene2d.ui.Window
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OptionDialogue(String question, int width, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, SoundManager soundManager)
    Deprecated.
    Creates a small window that can be shown or hidden to prompt the user for a yes/no input.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    act(int keycode)
    Deprecated.
    Takes a keycode input, and switches which value is pointed to on the dialogue.
    boolean
    Deprecated.
    Gets the choice that the user has selected on the menu
    com.badlogic.gdx.scenes.scene2d.ui.Window
    Deprecated.
     
    boolean
    Deprecated.
     
    void
    Deprecated.
    Sets the choice to a certain value
    void
    setPos(float x, float y)
    Deprecated.
    Set the position of the window
    void
    Deprecated.
    Sets the text to be displayed on the window, usually a question
    void
    setVisible(boolean visible)
    Deprecated.
    Sets the window's visible variable, used to hide/unhide
    void
    setWidth(int x)
    Deprecated.
    Set the width of the window
    private void
    Deprecated.
    Sets the pointer arrow to point to a different label depending on what the user's current choice is if choice == true the arrow will point to 'yes'

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • window

      private com.badlogic.gdx.scenes.scene2d.ui.Window window
      Deprecated.
    • questionLabel

      public com.badlogic.gdx.scenes.scene2d.ui.Label questionLabel
      Deprecated.
    • leftArrow

      private com.badlogic.gdx.scenes.scene2d.ui.Label leftArrow
      Deprecated.
    • rightArrow

      private com.badlogic.gdx.scenes.scene2d.ui.Label rightArrow
      Deprecated.
    • visible

      boolean visible
      Deprecated.
    • choice

      boolean choice
      Deprecated.
    • soundManager

      private SoundManager soundManager
      Deprecated.
  • Constructor Details

    • OptionDialogue

      public OptionDialogue(String question, int width, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, SoundManager soundManager)
      Deprecated.
      Creates a small window that can be shown or hidden to prompt the user for a yes/no input. Became redundant when dialogue got selection boxes, but the code may still be useful to those continuing the project.
      Parameters:
      question - A question to display
      width - Width of the window
      skin - The game skin to use
      soundManager - An instance of soundManager to play sounds
  • Method Details

    • getWindow

      public com.badlogic.gdx.scenes.scene2d.ui.Window getWindow()
      Deprecated.
      Returns:
      The optionDialogue window to be added to a screen in GameScreen
    • setPos

      public void setPos(float x, float y)
      Deprecated.
      Set the position of the window
      Parameters:
      x -
      y -
    • setWidth

      public void setWidth(int x)
      Deprecated.
      Set the width of the window
      Parameters:
      x -
    • setQuestionText

      public void setQuestionText(String text)
      Deprecated.
      Sets the text to be displayed on the window, usually a question
      Parameters:
      text -
    • setVisible

      public void setVisible(boolean visible)
      Deprecated.
      Sets the window's visible variable, used to hide/unhide
      Parameters:
      visible -
    • isVisible

      public boolean isVisible()
      Deprecated.
      Returns:
      Returns true if the window is visible
    • getChoice

      public boolean getChoice()
      Deprecated.
      Gets the choice that the user has selected on the menu
      Returns:
      true for yes and false for no
    • setChoice

      public void setChoice(Boolean choice)
      Deprecated.
      Sets the choice to a certain value
      Parameters:
      choice - true for yes and false for no
    • act

      public void act(int keycode)
      Deprecated.
      Takes a keycode input, and switches which value is pointed to on the dialogue. If yes is pointed to, and d is pressed, no will be selected This would usually be called inside an InputHandler
      Parameters:
      keycode - An integer keycode
    • updateArrow

      private void updateArrow()
      Deprecated.
      Sets the pointer arrow to point to a different label depending on what the user's current choice is if choice == true the arrow will point to 'yes'