Ejemplo n.º 1
0
        /// <summary>
        /// Allocate resources, or subscribe to events
        /// when the menu is loaded.
        /// </summary>
        protected override void OnLoad()
        {
            playButton     = GetControl <ITriggerButton>("PlayButton");
            settingsButton = GetControl <ITriggerButton>("SettingsButton");
            exitButton     = GetControl <ITriggerButton>("ExitButton");

            playButton.OnClick     += PlayButton_OnClick;
            settingsButton.OnClick += SettingsButton_OnClick;
            exitButton.OnClick     += ExitButton_OnClick;
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        Label  label  = GetComponent <Label>();
        ILabel iLabel = GetComponent <ILabel>();

        ITriggerButton button = GetComponent <ITriggerButton>();

        button.OnFocus += (sender, args) => { Debug.Log("Focused!"); };
        button.OnBlur  += (sender, args) => { Debug.Log("Blurred!"); };
        button.OnClick += (sender, args) => { Debug.Log("Clicked!!"); };

        int four = 4;
    }
Ejemplo n.º 3
0
        /// <summary>
        /// Anytime the menu view is loaded, find all the important views.
        /// </summary>
        protected override void OnLoad()
        {
            usernameTextBox    = GetControl <ITextBox>("UsernameField");
            passwordTextBox    = GetControl <ITextBox>("PasswordField");
            rememberMeCheckBox = GetControl <ICheckBox>("RememberToggle");
            loginButton        = GetControl <ITriggerButton>("LoginButton");

            loginButton.OnClick += LoginButton_OnClick;
            rememberMeCheckBox.OnCheckChange += RememberMeCheckBox_OnCheckChange;
            usernameTextBox.OnBlur           += UsernameTextBox_OnBlur;
            passwordTextBox.OnBlur           += PasswordTextBox_OnBlur;

            loginConfig = GetConfig <LoginConfig>();

            //Do we have values to populate?
            if (loginConfig.HasToken())
            {
                Model.Username   = loginConfig.Username;
                Model.Password   = "******";
                Model.RememberMe = true;
                Model.Token      = loginConfig.Token;
            }
        }