示例#1
0
        protected override void OnElementChanged(ElementChangedEventArgs <UrhoSurface> e)
        {
            SDLActivity.OnResume();
            var surface = new AndroidUrhoSurface(Context);

            e.NewElement.UrhoApplicationLauncher = surface.Launcher;
            SetNativeControl(surface);
            base.OnElementChanged(e);
        }
示例#2
0
        internal async Task <Urho.Application> Launcher(Type type, ApplicationOptions options)
        {
            await launcherSemaphore.WaitAsync();

            SDLActivity.OnDestroy();
            applicationTaskSource     = new TaskCompletionSource <Application>();
            Urho.Application.Started += UrhoApplicationStarted;
            var surfaceView = Urho.Droid.UrhoSurface.CreateSurface((Activity)Context, type, options);

            SDLActivity.OnResume();
            surfaceViewPlaceholder.AddView(surfaceView);
            return(await applicationTaskSource.Task);
        }
示例#3
0
        protected override void OnElementChanged(ElementChangedEventArgs <Urho.Forms.UrhoSurface> e)
        {
            SDLActivity.OnResume();
            var surface = new AndroidUrhoSurface(Context);

            if (e.NewElement == null)
            {
                return;
            }

            e.NewElement.RegisterRunner(surface.Launcher);
            SetNativeControl(surface);
            base.OnElementChanged(e);
        }
示例#4
0
 public static void OnResume()
 {
     SDLActivity.OnResume();
 }
示例#5
0
 public static void OnResume()
 {
     SDLActivity.OnResume();
     Urho.Application.HandleResume();
 }
示例#6
0
 protected override void OnResume()
 {
     base.OnResume();
     SDLActivity.OnResume();
 }