Hi.
I'm using the include https://github.com/Southclaws/progress2 and a small bug is happening.
I could create an issue post in the repository but it was archived by the owner.
On my old monitor the resolution was 1280x720 there was no problem.
My current monitor is 2560x1080 and the following bug is happening when the bar value is less than 5.5:
Here is the function to return the current progress value:
If I change the code to
Fix the problem but creates another:
FIXED THE PROBLEM
I made several corrections in the include and managed to solve my problem.
If anyone is interested I'm sharing:?https://github.com/Walter-Correa/progress2
I'm using the include https://github.com/Southclaws/progress2 and a small bug is happening.
I could create an issue post in the repository but it was archived by the owner.
On my old monitor the resolution was 1280x720 there was no problem.
My current monitor is 2560x1080 and the following bug is happening when the bar value is less than 5.5:
Here is the function to return the current progress value:
PHP Code:
stock Float:_bar_percent(Float:x, Float:widthorheight, Float:max, Float:value, direction)
{
new Float:result;
switch(direction)
{
case BAR_DIRECTION_RIGHT:
{
result = ((x - 3.0) (((((x - 2.0) widthorheight) - x) / max) * value));
}
case BAR_DIRECTION_LEFT:?
{
result = ((x - 1.0) - (((((x 2.0) - widthorheight) - x) / max) * -value)) - 4.0;
}
case BAR_DIRECTION_UP:?
{
result = -((((((widthorheight / 10.0) - 0.45) * 1.02) / max) * value) 0.55);
}
case BAR_DIRECTION_DOWN:?
{
result = ((((((widthorheight / 10.0) - 0.45) * 1.02) / max) * value) - 0.55);
}
}
return result;
}
If I change the code
Code:
result = ((x - 3.0) (((((x - 2.0) widthorheight) - x) / max) * value));
Code:
result = (x ((((x widthorheight) - x) / max) * value));
Fix the problem but creates another:
FIXED THE PROBLEM
I made several corrections in the include and managed to solve my problem.
If anyone is interested I'm sharing:?https://github.com/Walter-Correa/progress2