Posts

Showing posts with the label progress-bar

Progress bars for tasks that can take an indeterminate ammount of time? [closed]

Image
Progress bars for tasks that can take an indeterminate ammount of time? [closed] Another random question that hit me (I've drank ~9 cups of coffee in the last 5 hours, so sorry...) -- What kind of progress bar would you show a user for a taks that you do don't know how long it would take, but you have a good idea of an "average" time. For example, a task that would usually take around 30 seconds, but you have no way of knowing the progress (other than if its still going on or just failed). What would be the best UX?: Would the answer differ if the average time was 10 minutes instead of 30 seconds? Thanks, Robert EDIT: Just to be clear, the question is about progress bars where you have NO idea/indication of how long it will take (for example, executing a task on a remote machine). If you do have some indication of progress, it's often good to use that. Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Av...

Decreasing a static image progress bar horizontally in SDL

Decreasing a static image progress bar horizontally in SDL In my project, I have a decreasing timer progress bar PNG image on display. This image and its background can be found at the below link: https://s3.eksiup.com/df7dd38f781.png My goal is to make the bar decrease starting from the upper green side to the lower red side. My code for this is the following: void EntityTimer::OnRender(SDL_Renderer *ren) { SDL_Rect currRect,dstRect; double rem=0.0; memcpy(&currRect,&origRect,sizeof (SDL_Rect)); memcpy(&dstRect,&origRect,sizeof (SDL_Rect)); if (timerObjPtr->remainingDuration>timerObjPtr->durationInMilisec) timerObjPtr->durationInMilisec=timerObjPtr->remainingDuration; rem=((double)timerObjPtr->remainingDuration/timerObjPtr->durationInMilisec); currRect.h=(origRect.h)*rem; currRect.h = currRect.h; dstRect.x=0; dstRect.y=0; dstRect.h=currRect.h...