Exemple #1
0
 void OnLoaded(object sender, RoutedEventArgs e)
 {
     Transform  = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
     Controller = new GameController(this);
     Controller.Startup(new FileStorage());
     SkiaView.InvalidateVisual();
 }
Exemple #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Controller = new LS.UI.GameController(this);
            Controller.Startup(new FileStorage());

            Canvas = new CanvasView(View.Frame)
            {
                IgnorePixelScaling = true
            };
            Canvas.PaintSurface += OnPlatformPaint;

            View.AddSubview(Canvas);

            Canvas.AutoresizingMask = NSViewResizingMask.MinXMargin | NSViewResizingMask.MinYMargin |
                                      NSViewResizingMask.MaxXMargin | NSViewResizingMask.MaxYMargin | NSViewResizingMask.HeightSizable |
                                      NSViewResizingMask.WidthSizable;
        }