MCPcopy Create free account
hub / github.com/diasurgical/devilution / progress_Render

Function progress_Render

SourceX/DiabloUI/progress.cpp:67–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void 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
95BOOL UiProgressDialog(HWND window, char *msg, int enable, int (*fnfunc)(), int rate)
96{

Callers 1

UiProgressDialogFunction · 0.85

Calls 3

DrawArtFunction · 0.85
GetCenterOffsetFunction · 0.85
BlitFunction · 0.85

Tested by

no test coverage detected