Esempio n. 1
0
        public static Window CreateWindow(string title, int width, int height, float left, float top, bool controls = true)
        {
            Window window = CreateWindow();

            window.controls = controls;
            window.width    = width;
            window.height   = height;
            window.position = new Rect(left, top, window.width, window.height);
            window.title    = title;
            if (controls)
            {
                window.optionsWindow = OptionsWindow.CreateWindow();
            }

            return(window);
        }
Esempio n. 2
0
        public static Window CreateWindow(string title, int width, int height, bool controls = true)
        {
            Window window = CreateWindow();

            window.controls = controls;
            window.width    = width;
            window.height   = height;
            Vector2 centerPoint = new Vector2(Screen.width / 2, Screen.height / 2);

            window.position = new Rect(centerPoint.x - (window.width / 2), centerPoint.y - (window.height / 2), window.width, window.height);
            window.title    = title;
            if (controls)
            {
                window.optionsWindow = OptionsWindow.CreateWindow();
            }

            return(window);
        }
        public new static OptionsWindow CreateWindow()
        {
            OptionsWindow window = Cast <OptionsWindow>(Window.CreateWindow("Options", 300, 80, false));

            return(window);
        }