| 65 | } |
| 66 | |
| 67 | void progress_Render(BYTE progress) |
| 68 | { |
| 69 | DrawArt(0, 0, &ArtBackground); |
| 70 | |
| 71 | int x = GetCenterOffset(280); |
| 72 | int y = GetCenterOffset(144, SCREEN_HEIGHT); |
| 73 | |
| 74 | DrawArt(x, y, &ArtPopupSm); |
| 75 | DrawArt(GetCenterOffset(227), y + 52, &ArtProgBG, 0, 227); |
| 76 | if (progress) { |
| 77 | DrawArt(GetCenterOffset(227), y + 52, &ProgFil, 0, 227 * progress / 100); |
| 78 | } |
| 79 | DrawArt(GetCenterOffset(110), y + 99, &SmlButton, 2, 110); |
| 80 | |
| 81 | if (msgSurface) { |
| 82 | SDL_Rect dsc_rect = { |
| 83 | static_cast<decltype(SDL_Rect().x)>(x + 50), |
| 84 | static_cast<decltype(SDL_Rect().y)>(y + 8), |
| 85 | msgSurface->w, |
| 86 | msgSurface->h |
| 87 | }; |
| 88 | Blit(msgSurface, NULL, &dsc_rect); |
| 89 | dsc_rect.x = GetCenterOffset(textWidth) - 1; |
| 90 | dsc_rect.y = y + 99 + 4; |
| 91 | Blit(cancleSurface, NULL, &dsc_rect); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | BOOL UiProgressDialog(HWND window, char *msg, int enable, int (*fnfunc)(), int rate) |
| 96 | { |
no test coverage detected