xbenny2506x Posted July 29, 2009 Share Posted July 29, 2009 I have a window and need now a Scroll Bar for turn left and right wnd = guiCreateWindow( 311,101,1044,804,"Teleport Menu",false ); Can somone say me how i can add a Scroll Bar? THX Link to comment
robhol Posted July 29, 2009 Share Posted July 29, 2009 http://development.mtasa.com/index.php? ... roll_panes I can assure you, the wiki and search functions don't bite. Link to comment
xbenny2506x Posted July 30, 2009 Author Share Posted July 30, 2009 I know and i have look there and i have now a Scroll Bar but the info in wiki has no example ... wnd = guiCreateWindow( 311,101,1044,804,"Teleport Menu",false ); local scroll = guiCreateScrollPane( 10, 10, 1044, 804, false, wnd); local scrolldata = guiScrollPaneSetScrollBars(wnd, true, false); And nothing... i have make some buttons and text more than the 1044 but the Scroll Bar make nothing. And for what is that?? In wiki i found no info about this guiScrollPaneGetHorizontalScrollPosition guiScrollPaneGetVerticalScrollPosition guiScrollPaneSetHorizontalScrollPosition guiScrollPaneSetVerticalScrollPosition BTW you sure that the wiki search funktion dont bite Link to comment
DakiLLa Posted July 31, 2009 Share Posted July 31, 2009 try to use guiCreateScrollBar, instead of scrollPane i think scroll pane was not what you wanted.. well, i lil bit modified your script: local scX, scY = guiGetScreenSize(); wnd = guiCreateWindow( scX/2-644/2, scY/2-504/2, 644, 504, "Teleport Menu", false ); local scroll = guiCreateScrollBar( 0.05, 0.9, 0.9, 0.05, true, true, wnd ); look, i centralized position of window and reduced its resolution (that was too big window i think ). How i centralized it? I got client screen size, then i take half of it, and subtract the half of width and height of your window. Pretty easy maths, isnt it? Ive made a scroll bar at the bottom of the window..you can place it where you want on your window.. btw, you should use relative coordinates of placement of element you want attach to a window. In your case it was wrong, it was like non-attached element, so you would have two different gui elements instead of one window with attached scroll bar 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