Example #1
0
    public void Start()
    {
        m_serverNameTextComponent   = ServerNameTextInput.GetComponent <InputField>();
        m_userNameTextComponent     = UserNameTextInput.GetComponent <InputField>();
        m_passwordTextComponent     = PasswordTextInput.GetComponent <InputField>();
        m_hostServerToggleComponent = HostServerToggle.GetComponent <Toggle>();
        m_loginStatusLabelComponent = LoginStatusLabel.GetComponent <Text>();
        m_versionTextComponent      = VersionLabel.GetComponent <Text>();
        m_statusScrollView          = StatusScrollView.GetComponent <ScrollTextView>();

        // Set the initial state of the host server toggle
        m_hostServerToggleComponent.isOn = false;

        // Hide the login status label until there is status to post
        LoginStatusLabel.SetActive(false);

        // Show/Hide the :"localhost" label based on the host server toggle
        SetLocalhostMode(m_hostServerToggleComponent.isOn);

        // If we're debugging, auto-fill in the password
        m_userNameTextComponent.text = "test";
        m_passwordTextComponent.text = "password";

        m_versionTextComponent.text = "Version: 1.0";
    }
Example #2
0
    public void Start()
    {
        m_serverNameTextComponent = ServerNameTextInput.GetComponent<InputField>();
        m_userNameTextComponent = UserNameTextInput.GetComponent<InputField>();
        m_passwordTextComponent = PasswordTextInput.GetComponent<InputField>();
        m_hostServerToggleComponent = HostServerToggle.GetComponent<Toggle>();
        m_loginStatusLabelComponent = LoginStatusLabel.GetComponent<Text>();
        m_versionTextComponent = VersionLabel.GetComponent<Text>();
        m_statusScrollView = StatusScrollView.GetComponent<ScrollTextView>();

        // Set the initial state of the host server toggle
        m_hostServerToggleComponent.isOn = false;

        // Hide the login status label until there is status to post
        LoginStatusLabel.SetActive(false);

        // Show/Hide the :"localhost" label based on the host server toggle
        SetLocalhostMode(m_hostServerToggleComponent.isOn);

        // If we're debugging, auto-fill in the password
        m_userNameTextComponent.text = "test";
        m_passwordTextComponent.text = "password";

        m_versionTextComponent.text = "Version: 1.0";
    }