// ############# Create a Constructor #############

        public DescriptionTabSteps()
        {
            // Inject the driver
            driver          = new ChromeDriver();
            loginPage       = new LoginPage(driver);
            descriptionPage = new DescriptionPage(driver);
        }
        public void createDescription()
        {
            DescriptionPage descriptionPage = new DescriptionPage(driver);

            descriptionPage.clickEditIconBtn(driver);
        }
Example #3
0
    public IEnumerator Start()
    {
        // wait until display has initialized
        while (!Display.IsInitialized())
        {
            yield return(null);
        }

        // output red hello world at 10,5 on layer 0
        string  menuStr   = "Menu:";
        Vector2 menuStart = new Vector2(0, 0);

        renderText(
            str: menuStr,
            x: (int)menuStart.x,
            y: (int)menuStart.y,
            fgColor: Color.red,
            clickable: true,
            hoverable: true
            );
        renderText(
            str: "?",
            x: (int)menuStart.x + menuStr.Length,
            y: (int)menuStart.y,
            fgColor: Color.yellow,
            clickable: true,
            hoverable: true
            );

        menus = new ButtonList[] {
            new ButtonList(
                new Button[] {
                new Button(
                    text: "clear",
                    mouseDown: delegate {
                    Debug.Log("clear");
                    this.renderPage = "";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "Description",
                    mouseDown: delegate {
                    Debug.Log("DescriptionPage");
                    this.renderPage = "DescriptionPage";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "Button",
                    mouseDown: delegate {
                    Debug.Log("ButtonPage");
                    this.renderPage = "ButtonPage";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "ButtonList",
                    mouseDown: delegate {
                    Debug.Log("ButtonListPage");
                    this.renderPage = "ButtonListPage";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "Player",
                    mouseDown: delegate {
                    Debug.Log("PlayerPage");
                    this.renderPage = "PlayerPage";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "Map",
                    mouseDown: delegate {
                    Debug.Log("MapPage");
                    this.renderPage = "MapPage";
                    this.clearLayer = 1;
                }
                    ),
                new Button(
                    text: "Container",
                    mouseDown: delegate {
                    Debug.Log("ContainerPage");
                    this.renderPage = "ContainerPage";
                    this.clearLayer = 1;
                }
                    )
            },
                x: 1,
                y: 1,
                layer: 0
                )
        };

        buttonPage      = new ButtonPage(x: 20, y: 1);
        buttonListPage  = new ButtonListPage(x: 20, y: 1);
        descriptionPage = new DescriptionPage(x: 20, y: 1);
        playerPage      = new PlayerPage(x: 20, y: 1);
        mapPage         = new MapPage(x: 20, y: 1);
        containerPage   = new ContainerPage(x: 20, y: 1);

        /*
         * menuButtons[0] = new Button(
         *  text: "a Room",
         *  x: 0,
         *  y: 1
         * );
         *
         * menuButtons[1] = new Button(
         *  text: "@ Walking",
         *  x: 0,
         *  y: 2
         * );
         */

        /*for (int x = 0; x < menu.Length; x++)
         * {
         *  Cell cell = Display.CellAt(0, 0 + x, 0);
         *  cell.SetContent(
         *      menu.Substring(x, 1),
         *      Color.clear,
         *      Color.red);
         * }*/

        /*
         * // add clickable cell text on layer 2
         * string clickableText = "Click->";
         * for (int x = 0; x < clickableText.Length; x++)
         * {
         *  Cell cell = Display.CellAt(2, x, 17);
         *  cell.SetContent(
         *      clickableText.Substring(x, 1),
         *      Color.clear,
         *      Color.yellow);
         * }
         */

        // add clickable cell on layer 0

        /*
         * Cell clickable = Display.CellAt(0, 0 + menu.Length, 0);
         * clickable.SetContent(
         *  "?",
         *  Color.black,
         *  Color.yellow);
         * clickable.clickAction = this;
         * clickable.hoverAction = this;
         */
        /*
         * Cell clickable2 = Display.CellAt(0, 0 + menu.Length, 1);
         * clickable2.SetContent(
         *  "#",
         *  Color.black,
         *  Color.yellow);
         * clickable2.clickAction = this;
         * clickable2.hoverAction = this;
         */
        //StartCoroutine(RandomGrid());
        //StartCoroutine(Transition());
    }