public void NavigateToPreview()
        {
            DashboardButton.Click();
            ProjectButton.Click();
            string Test = Header.Text.ToString();

            Assert.IsTrue(Test.Contains("VidoeGames"));
            TemplateButton.Click();

            TempButton.Click();
        }
Пример #2
0
        public void Logic()
        {
            position += (TargetPosition - position) * 5f * Editor.delta;

            //Change tab
            if (KeyboardInput.Current[Key.LAlt])
            {
                if (KeyboardInput.KeyPressed(Key.Down))
                {
                    tabIndex++;
                }
                if (KeyboardInput.KeyPressed(Key.Up))
                {
                    tabIndex--;
                }
            }

            if (MouseInput.Current.Wheel != MouseInput.Previous.Wheel)
            {
                if (Hovered)
                {
                    float delta = MouseInput.Current.Wheel - MouseInput.Previous.Wheel;

                    scrollSpeed -= 4.5f * delta;
                }
                else if (TabHovered)
                {
                    tabIndex -= (int)(MouseInput.Current.Wheel - MouseInput.Previous.Wheel);
                }
            }

            tabIndex = MathHelper.Clamp(tabIndex, 0, tabList.Length - 1);

            if (Math.Abs(scrollSpeed) > 0.001f)
            {
                scrollAmount[tabIndex] += scrollSpeed * Editor.delta;
                scrollSpeed            -= scrollSpeed * 5 * Editor.delta;
            }

            scrollAmount[tabIndex] = MathHelper.Clamp(scrollAmount[tabIndex], 0, ScrollAvailable);

            removeBuffer = null;

            foreach (TemplateButton btn in CurrentTab)
            {
                btn.Logic();
            }

            if (removeBuffer != null)
            {
                RemoveTemplate(removeBuffer);
            }
        }
Пример #3
0
        void RemoveTemplate(TemplateButton tb)
        {
            foreach (List <TemplateButton> t in tabList)
            {
                if (t.Contains(tb))
                {
                    int index = t.IndexOf(tb);

                    for (int i = index + 1; i < t.Count; i++)
                    {
                        t[i].Index -= 1;
                        tb.Dispose();
                        editor.DeleteTemplate(tb.template);
                    }

                    t.Remove(tb);
                }
            }
        }
Пример #4
0
        public void RemoveTemplate(Template t)
        {
            TemplateButton button = null;

            foreach (List <TemplateButton> tl in tabList)
            {
                foreach (TemplateButton tb in tl)
                {
                    if (tb.template == t)
                    {
                        button = tb;
                    }
                }
            }

            if (button != null)
            {
                RemoveTemplate(button);
            }
        }
        public void NavigateToDashboard()
        {
            DashboardButton.Click();
            ProjectButton.Click();
            string Test = Header.Text.ToString();

            Assert.IsTrue(Test.Contains("VideoGames"));
            TemplateButton.Click();

            dropdown.Click();
            for (int i = 0; i < DropdownItems.Count; i++)
            {
                if (DropdownItems[i].Text.Contains("Force"))
                {
                    string me = DropdownItems[i].Text.ToString();
                    DropdownItems[i].Click();
                    unlockSubmit.Click();
                }
            }
            TempButton.Click();
        }