display the percentage in the progress bar, and update the energy text with the new value