Mr.Loki Posted January 29, 2017 Posted January 29, 2017 (edited) OK, so this is my setup: I've modified the scrollbar so that it scrolls from 0 to 1 instead of 100 Is it possible apply the minimum(-33) and the max(64) to the scrollbar so that 0 = min of -33 and 1 = max of 64? local scrollPos = guiScrollBarGetScrollPosition windw = guiCreateWindow(143, 305, 673, 170, "", false) guiWindowSetSizable(windw, false) sbar = guiCreateScrollBar(86, 33, 501, 51, true, false, windw) min = guiCreateEdit(9, 33, 88, 51, "-33", false, windw) max = guiCreateEdit(578, 33, 88, 51, "64", false, windw) result = guiCreateEdit(297, 89, 88, 51, "-33", false, windw) showCursor( true ) addEventHandler( "onClientRender", root, function ( ) local pos = (scrollPos(sbar) / 100) guiSetText(result,pos) end ) I suck at math. ._. Edited January 29, 2017 by loki2143 [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
ViRuZGamiing Posted January 30, 2017 Posted January 30, 2017 min + (max-min)* x 1 "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Mr.Loki Posted January 30, 2017 Author Posted January 30, 2017 Thanks alot [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
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