using UnityEngine;
using UnityEngine.UI;

public class PanelController : MonoBehaviour
{
    public GameObject panel; // Assign your panel in the inspector

    // Use this for initialization
    void Start()
    {
        // Optional: Hide the panel at the start of the game
        panel.SetActive(false);
    }

    // Call this function to toggle the panel's visibility
    public void TogglePanel()
    {
        // If the panel is active, hide it. Otherwise, show it.
        panel.SetActive(!panel.activeSelf);
    }

    public InputField inputField; // Assign your InputField in the inspector
    public Text displayText; // Assign your Text in the inspector
    public Text InputClues; // Assign your Text in the inspector

    // Call this function to get the text from the InputField and display it in the Text
    public void DisplayInputFieldText()
    {
        // Get the text from the InputField
        string inputText = inputField.text;

        // Display the text in the Text component
        displayText.text = inputText;
        InputClues.text=inputText;
    }

    public Text title;

    public void ChangeText()
    {
        // Get the text from the InputField
        string hint = "Your clues:";

        // Display the text in the Text component
        // displayText.text = inputText;
        title.text=hint;
    }
}
