示例#1
0
        public void HandleCommandsChanged(Element playbin)
        {
            InDvdMenu = false;
            // Get available command to know if player is in menu
            // FIXME: GlobalVideo should be Gst.Video.Global
            Gst.Query query = Global.NavigationQueryNewCommands();

            NavigationCommand[] cmds;
            if (Navigation == null)
            {
                FindNavigation(playbin);
            }
            if (!(NavigationElement.Query(query) && NavigationAdapter.ParseCommands(query, out cmds)))
            {
                return;
            }
            foreach (NavigationCommand cmd in cmds)
            {
                switch (cmd)
                {
                case NavigationCommand.Activate:
                case NavigationCommand.Left:
                case NavigationCommand.Right:
                case NavigationCommand.Up:
                case NavigationCommand.Down:
                    InDvdMenu = true;
                    break;

                default:
                    break;
                }
            }
        }
    public void CancelControllerInput(NavigationElement navElement)
    {
        // Already not using controller, return
        if (activeIndex == -1)
        {
            return;
        }

        activeMenuHierarchy.Peek().menuElements[activeIndex].DeselectElement();
        EventSystem.current.SetSelectedGameObject(null);
        activeIndex = -1;
        timer       = 0;
    }
示例#3
0
    public void RemoveElement(Grabable grabable)
    {
        NavigationElement delete = null;

        foreach (var element in _elements)
        {
            if (element.ParentIsNull || !element.Type)
            {
                continue;
            }
            if (element.Type.Equals(grabable))
            {
                delete = element;
            }
        }

        if (delete)
        {
            _elements.Remove(delete);
            delete.gameObject.SetActive(false);
        }
    }
示例#4
0
        public Header()
        {
            _links = new List <AnchorElement>()
            {
                new AnchorElement()
                {
                    Attribs = new Element.Attributes()
                    {
                        ["href"] = "/"
                    },
                    Content = new PlainText("Central"),
                    Classes = new[] { "titleLink" },
                },
                new AnchorElement()
                {
                    Attribs = new Element.Attributes()
                    {
                        ["href"] = "/ops"
                    },
                    Content = new PlainText("Ops")
                },
                new AnchorElement()
                {
                    Attribs = new Element.Attributes()
                    {
                        ["href"] = "/converse"
                    },
                    Content = new PlainText("Converse")
                },
            };

            nav = new NavigationElement()
            {
                Content = _links.ToArray(),
            };
        }
        public void TestTitleVegan()
        {
            NavigationElement Element = new NavigationElement(driver).Open().AcceptCookies().ClickVeganButton().WaitForTitle();

            Assert.AreEqual("Veganiški produktai", Element.ProductTitle.Text, "Displays expected title");
        }