Class ChatbotUI

java.lang.Object
com.csse3200.game.components.mainmenu.ChatbotUI

public class ChatbotUI extends Object
A class that handles the chatbot UI and its functionality. It includes methods to create, display, and process user input for the chatbot window. The chatbot service can answer predefined questions and also provides a keyword-based input system.
  • Constructor Details

    • ChatbotUI

      public ChatbotUI(com.badlogic.gdx.scenes.scene2d.Stage stage, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, MainMenuDisplay mainMenuDisplay)
      Constructor to initialize the Chatbot UI.
      Parameters:
      stage - The stage where the chatbot window will be added.
      skin - The skin used to style the UI elements.
      mainMenuDisplay - The main menu display that handles menu visibility and interaction.
  • Method Details

    • openchatbotTable

      public void openchatbotTable()
      Opens the chatbot window in the center of the screen.
    • closechatbotTable

      public void closechatbotTable()
      Closes the chatbot window and makes the menu interactive again.
    • ischatbotTableVisible

      public boolean ischatbotTableVisible()
      Checks if the chatbot window is visible.
      Returns:
      true if the chatbot window is visible, false otherwise.
    • updatechatbotTablePosition

      public void updatechatbotTablePosition()
      Updates the position of the chatbot window when the screen size changes.