Exemple #1
0
    public override void OnInit()
    {
        this.contentComponent = this.GetLayoutComponent <UIWindowExampleComponent>();

        this.buttonAlert = this.GetLayoutComponent <ButtonComponent>(LayoutTag.Tag4);
        this.buttonAlert.SetCallback(this.OnAlert);

        this.button = this.GetLayoutComponent <ButtonWithTipComponent>();
        this.button.SetCallback(this.OnClick);

        this.button.SetTextToTip("<b>Click here to open new instance.</b>\nYou can simply edit this text or pass it from the code. See UIWindowExampleTip and UIWindowExampleScreen.");
    }
    public override void OnInit()
    {
        this.contentComponent = this.GetLayoutComponent <UIWindowExampleComponent>();

        this.buttonAlert = this.GetLayoutComponent <ButtonComponent>(LayoutTag.Tag4);
        this.buttonAlert.SetCallback(this.OnAlert);

        this.button = this.GetLayoutComponent <ButtonWithTipComponent>();
        this.button.SetCallback(this.OnClick);

        this.button.SetTextToTip("<b>Click here to open new instance.</b>\nYou can simply edit this text or pass it from the code. See UIWindowExampleTip and UIWindowExampleScreen.");

        if (this.closeOnButtonPress == true)
        {
            this.contentComponent.SetText("This is the second instance of UIWindowExampleScreen. Look for this behaviour in UIWindowExampleScreen->OnInit() method.");
            this.button.SetTextToTip("<b>Click here to close current instance.</b>\nYou can simply edit this text or pass it from the code. See UIWindowExampleTip and UIWindowExampleScreen.");
        }
    }