// The program's start point, entered from the Launcher // RuntimeConfiguration is provided public static void Start(RuntimeConfiguration rtc) { Runtime = rtc; //Create the Ruby instance Ruby = new Ruby(); //compensate for border and caption thickness int width = Runtime.GetDefaultResolutionWidth(); // + (GetSystemMetrics(SystemMetric.SM_CXFIXEDFRAME) << 1); int height = Runtime.GetDefaultResolutionHeight(); // + (GetSystemMetrics(SystemMetric.SM_CYFIXEDFRAME) << 1) + GetSystemMetrics(SystemMetric.SM_CYCAPTION); Window = new GameWindow(width, height); OG_Graphics.dpi_scale = Window.Width / (float)width; Window.Width = width; Window.Height = height; System.Drawing.Size client_size = Window.ClientSize; client_size.Width = width; client_size.Height = height; Window.ClientSize = client_size; Window.Icon = Properties.Resources.OpenGame; Window.Resize += (sender, e) => { OnResize(sender, e); }; Window.Closed += (sender, e) => { OnClose(sender, e); }; Window.Visible = true; OnLoad(); //Start the game Ruby.Start(); //Clean up the Ruby instance Ruby.Dispose(); }
// The program's start point, entered from the Launcher // RuntimeConfiguration is provided public static void Start(RuntimeConfiguration rtc) { Runtime = rtc; //Create the Ruby instance Ruby = new Ruby(); Window = new GameWindow(Runtime.GetDefaultResolutionWidth(), Runtime.GetDefaultResolutionHeight()); Window.Icon = Properties.Resources.OpenGame; Window.Resize += (sender, e) => { OnResize(sender, e); }; Window.Closed += (sender, e) => { OnClose(sender, e); }; Window.Visible = true; OnLoad(); //Start the game Ruby.Start(); //Clean up the Ruby instance Ruby.Dispose(); }