itHyperoX Posted September 14, 2018 Share Posted September 14, 2018 (edited) Hi! I'm trying to calculate the position for a scrolling bar. I tried so many way, but i just failed. After wasted 2 hours for nothing, can anybody help me please ? If needed, i'll post the code. I have a bg and i want the scrolling bar working with that. local screenSize = {guiGetScreenSize()} local panelW, panelH = 500, 300 local panelX, panelY = screenSize[1]/2-panelW/2, screenSize[2]/2-panelH/2 maxDraw = 5 --currentRow is when scrolling. Thats + 1 or -1 dxDrawRectangle(panelX - 40, panelY, 10, panelH, tocolor(0, 0, 0, 220)) -- BG dxDrawRectangle(panelX - 40, panelY + currentRow * maxDraw / #weaponTable, 10, 40, tocolor(0, 200, 0, 190)) Edited September 14, 2018 by TheMOG Link to comment
itHyperoX Posted September 15, 2018 Author Share Posted September 15, 2018 Anyone please ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now