private void OnLoaded(Object sender, RoutedEventArgs routedEventArgs) { var flatRedBallControl = new FlatRedBallControl(); _mainGame = new Game1(flatRedBallControl); var frbTab = AddTab(flatRedBallControl); frbTab.Title = "Game"; StackPanel stackPanel = new StackPanel(); stackPanel.Children.Add(new Button { Content = "asdf" }); stackPanel.Children.Add(new Button { Content = "asdf2" }); stackPanel.Children.Add(new Button { Content = "asdf3" }); stackPanel.Children.Add(new Button { Content = "asdf4" }); AddTab(stackPanel); PluginManager.Self.Initialize(); }
public FlatRedBallGameBase(FlatRedBallControl frbControl) { mFrbControl = frbControl; // Get the starting size of the control and start listening // to its Resize events. _windowHandle = frbControl.Handle; RenderWidth = (Int32)frbControl.RenderSize.Width; RenderHeight = (Int32)frbControl.RenderSize.Height; frbControl.SizeChanged += XnaControlOnSizeChanged; // Create the graphics device manager and set the delegate for initializing the graphics device Graphics = new GraphicsDeviceManager(this); Graphics.PreferMultiSampling = true; Graphics.SynchronizeWithVerticalRetrace = true; Graphics.PreparingDeviceSettings += PreparingDeviceSettings; StartInitialization(); Content.RootDirectory = "Content"; }
public FlatRedBallGameBase(FlatRedBallControl frbControl) { mFrbControl = frbControl; // Get the starting size of the control and start listening // to its Resize events. _windowHandle = frbControl.Handle; RenderWidth = (Int32) frbControl.RenderSize.Width; RenderHeight = (Int32) frbControl.RenderSize.Height; frbControl.SizeChanged += XnaControlOnSizeChanged; // Create the graphics device manager and set the delegate for initializing the graphics device Graphics = new GraphicsDeviceManager(this); Graphics.PreferMultiSampling = true; Graphics.SynchronizeWithVerticalRetrace = true; Graphics.PreparingDeviceSettings += PreparingDeviceSettings; StartInitialization(); Content.RootDirectory = "Content"; }
public MainGame(FlatRedBallControl frbControl) : base(frbControl) { }
public Game1(FlatRedBallControl frbControl) : base(frbControl) { }