mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-03 13:02:42 +02:00
possibly fix lag/crash when deleting stamps
This commit is contained in:
@@ -101,7 +101,10 @@ void TaskWindow::OnDraw()
|
|||||||
{
|
{
|
||||||
if(progress > 0)
|
if(progress > 0)
|
||||||
{
|
{
|
||||||
|
if(progress > 100)
|
||||||
|
progress = 100;
|
||||||
float size = float(Size.X-4)*(float(progress)/100.0f); // TIL...
|
float size = float(Size.X-4)*(float(progress)/100.0f); // TIL...
|
||||||
|
size = std::min(std::max(size, 0.0f), float(Size.X-4));
|
||||||
g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255);
|
g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user