[Pawn] ProgressBar2 on high resolution - [FIXED] - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] ProgressBar2 on high resolution - [FIXED] (/showthread.php?tid=1225) |
ProgressBar2 on high resolution - [FIXED] - JR_Junior - 2020-10-09 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: PHP Code: stock Float:_bar_percent(Float:x, Float:widthorheight, Float:max, Float:value, direction) 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 RE: ProgressBar2 on high resolution - [FIXED] - JR_Junior - 2020-10-10 FIXED |