Example #1
0
 protected override bool OnUpdate()
 {
     UpdateUI();
     NativeActions.GetInstance().Execute();
     DllImports.Draw();
     return(true);
 }
Example #2
0
 private void LoadTiles()
 {
     _resourcesTargetCount += ContentList.Count;
     foreach (var contentItem in ContentList)
     {
         NativeActions.GetInstance().Enqueue(() => LoadAndSchedule(new TileResource(DllImports.AddTile(), contentItem.Poster, contentItem.Title ?? "", contentItem.Description ?? "")));
     }
 }
Example #3
0
        private async void LoadAndSchedule(Resource resource)
        {
            await Task.Run(async() =>
            {
                await resource.Load();
            });

            NativeActions.GetInstance().Enqueue(resource.Push);
            ++_resourcesLoadedCount;
            UpdateLoadingState();
        }
Example #4
0
        private async void SetLoaderLogo(string path)
        {
            var imageData = await Resource.GetImage(path);

            NativeActions.GetInstance().Enqueue(() =>
            {
                unsafe
                {
                    fixed(byte *pixels = imageData.Pixels)
                    DllImports.SetLoaderLogo(new DllImports.ImageData
                    {
                        id     = 0,
                        pixels = pixels,
                        width  = imageData.Width,
                        height = imageData.Height,
                        format = (int)imageData.Format
                    });
                }
            });
        }