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); }
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); }