Package com.skloch.game
Class OptionDialogue
java.lang.Object
com.skloch.game.OptionDialogue
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
FieldsModifier and TypeFieldDescription(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
ConstructorsConstructorDescriptionOptionDialogue
(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 TypeMethodDescriptionvoid
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 menucom.badlogic.gdx.scenes.scene2d.ui.Window
Deprecated.boolean
Deprecated.void
Deprecated.Sets the choice to a certain valuevoid
setPos
(float x, float y) Deprecated.Set the position of the windowvoid
setQuestionText
(String text) Deprecated.Sets the text to be displayed on the window, usually a questionvoid
setVisible
(boolean visible) Deprecated.Sets the window's visible variable, used to hide/unhidevoid
setWidth
(int x) Deprecated.Set the width of the windowprivate 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'
-
Field Details
-
window
private com.badlogic.gdx.scenes.scene2d.ui.Window windowDeprecated. -
questionLabel
public com.badlogic.gdx.scenes.scene2d.ui.Label questionLabelDeprecated. -
leftArrow
private com.badlogic.gdx.scenes.scene2d.ui.Label leftArrowDeprecated. -
rightArrow
private com.badlogic.gdx.scenes.scene2d.ui.Label rightArrowDeprecated. -
visible
boolean visibleDeprecated. -
choice
boolean choiceDeprecated. -
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 displaywidth
- Width of the windowskin
- The game skin to usesoundManager
- 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
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
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'
-