Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CLauncher::DrawAppDrawer()
- {
- for(int i = 0; i < sizeof(Apps) / sizeof(CAppDesc*); i++)
- {
- int x = drawerAnimator->X + (i * 75);
- int y = drawerAnimator->Y;
- Graphics->DrawImage(Apps[i]->Icon, x, y);
- if(Input->IsTouchedAt(x, y, Apps[i]->Icon->Width, Apps[i]->Icon->Height))
- {
- StartScreen(new CDialerScreen());
- }
- }
- }
- void CLauncher::StartScreen(CScreen* screen)
- {
- if(screen)
- {
- currentScreen = screen;
- currentScreen->Show();
- }
- }
- void CLauncher::Run()
- {
- CImage* test = CImage::FromFile("ui/stFiller.tga");;
- while(true)
- {
- Input->Update();
- Graphics->DrawImage(Wallpaper, 0, 0);
- if(currentScreen)
- {
- currentScreen->Update();
- currentScreen->Draw();
- }
- else
- {
- drawerAnimator->Update();
- DrawAppDrawer();
- }
- Status->Update();
- Status->Draw();
- if(Dialog->IsVisible())
- Dialog->Draw();
- Graphics->Flip();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement