Lukkaz Posted February 5, 2011 Share Posted February 5, 2011 GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} Window= guiCreateWindow(171,158,452,337,"Help Menu",false) tabPanel = guiCreateTabPanel(19,34,411,287,false,Window) scrollTab = guiCreateTab("FAQ",tabPanel) scrollBar = guiCreateScrollBar(384,13,22,233,false,false,scrollTab) info = guiCreateLabel(17,13,361,243,"A BUNCH OF TEXTTTT(enough to need the scrolling becuase it gets cut off",false,scrollTab) not scrolling the scroll bar will move down but won't move anything down with it any helps appreciated Link to comment
SDK Posted February 5, 2011 Share Posted February 5, 2011 you need guiCreateScrollPane put the label's parent the scrollpane Link to comment
Lukkaz Posted February 5, 2011 Author Share Posted February 5, 2011 I don't understand...lol instead of tabPabel use scrollPanel? Link to comment
SDK Posted February 5, 2011 Share Posted February 5, 2011 No, you use a scrollPane instead of a scrollbar. If I'm right, scrollbar's are used for inputting values, like sound volume or other settings in GUI's. Everything inside a scrollPane that's bigger then the scrollPane itself will make the scrollbars itself. GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} Window= guiCreateWindow(171,158,452,337,"Help Menu",false) tabPanel = guiCreateTabPanel(19,34,411,287,false,Window) scrollTab = guiCreateTab("FAQ",tabPanel) scrollPane = guiCreateScrollPane(5,5,200,200,false,scrollTab) info = guiCreateLabel(17,13,361,243,"A BUNCH OF TEXTTTT(enough to need the scrolling becuase it gets cut off",false,scrollPane ) Link to comment
Lukkaz Posted February 6, 2011 Author Share Posted February 6, 2011 Now This Happens.... Link to comment
Castillo Posted February 6, 2011 Share Posted February 6, 2011 i'm sure you are using "scrollBar" but you should use "scrollPane" instead, check all your GUI where you add the ELEMENTS. Link to comment
Lukkaz Posted February 7, 2011 Author Share Posted February 7, 2011 scrollPane = guiCreateScrollPane(5,5,200,200,false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(17,13,361,243,"blahhh blahh blahhh",false,scrollPane) nope using scrollPane triple checked and theres no scroll bar in entire script but it's still cut off and not scrolling Link to comment
Lukkaz Posted February 9, 2011 Author Share Posted February 9, 2011 bump still having the same issue it's still cut off in the tab now but not scrolling Link to comment
Castillo Posted February 9, 2011 Share Posted February 9, 2011 Something must be wrong, like the scrollPane is not being created. Link to comment
Lukkaz Posted February 9, 2011 Author Share Posted February 9, 2011 addEventHandler( "onClientPlayerResourceStart", getRootElement( ), function() bindKey ( "F1", "down", toggleHelp) end ) GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(171,158,452,337,"Help Menu",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(19,34,411,287,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(14,9,368,247,"1. Roleplay at ALL times, 2. Respect everyone we will not tolerate hostile behavior (occly) 3. No PowerGaming or MetaGaming 4. When pulling out a weapon you MUST use a /me to pull out the weapon/object 5. No Deathmatching 6. No cheats, hacks or bug abuse is allowed 7. No Ninja jacking, Pushing cars into the roads, or destorying cars occly 8. No vehicle sale scams 9. No advertising of other servers 10. Do not mix OOC chat with IC chat 11. No revenge killing \n\n**Any violation of the rules may result in a kick, jail time or even a ban! You have been warned.**",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",true) GUIEditor_Tab[2] = guiCreateTab("Commands",GUIEditor_TabPanel[1]) GUIEditor_Label[2] = guiCreateLabel(18,-4,5,5,"",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(16,9,369,247,"The following commands are already bound to your keyboard:\n\nt - IC Chat, only roleplayed chat should be used b - local OOC chat o - global OOC chat (if enabled) i - view your inventory f2 - brings up the report window __________________________________________________________________\n**Useful text commands (used with t)**\n/animlist - a list of animations /gate - opens doors (some are faction based) ",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",true) GUIEditor_Tab[3] = guiCreateTab("FAQ",GUIEditor_TabPanel[1]) scrollPane = guiCreateScrollPane(5,5,361,287,false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(17,13,361,243,"Q. I just started playing on the server, what can I do?\nA. In Strange Gaming you can do anything you set your mind to, want to be a multi millionaire tycoon? Start a business, want to be in the mafia? Find members and get involved. Most of these activities require you to visit the forums (StrangeGaming.tk) and join the specific group. \nQ. What's a faction? \nA. Factions are groups that roleplay a specific role with more in depth scripting oppertunities. Anyone can create a faction but to become official you must show longitivity and high roleplaying skill. \nQ. I found a bug, what do I do?\nA. Simply use f2 and report it to an admin to have it taken care of. \nQ. Whats Power Gaming? \nA. PowerGaming is forcing a player to roleplay your way with little to no roleplay.\nQ. What is MetaGaming?\nA. MetaGaming is using OOC information to benifit your player IC \nQ. What is revenge killing? \nA. Revenge killing is killing a player after he has RPly killed your character. When you die you should have no memory of your killer and go after him. If you must revenge your dealth find a good RP reason to if you can not DON'T DO IT.",false,scrollPane) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",true) GUIEditor_Tab[4] = guiCreateTab("Sources",GUIEditor_TabPanel[1]) GUIEditor_Label[5] = guiCreateLabel(17,11,360,248,"Forums: [url=http://www.StrangeGaming.tk]http://www.StrangeGaming.tk[/url] Developer: Lukkaz \n \nWe are looking for more scripters so if you are interested go on the forums and speak to Lukkaz and prove your scripting abilities for a position on the team!",false,GUIEditor_Tab[4]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",true) GUIEditor_Label[6] = guiCreateLabel(282,26,147,24,"Strange Gaming",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) function toggleHelp () if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- check if the gui element is visible guiSetVisible ( GUIEditor_Window[1], false ) -- if it is, we hide it showCursor(false) else guiSetVisible ( GUIEditor_Window[1], true ) -- if not, we make it visible showCursor(true) end end that's the whole code. Could someone tell me why this is happening I am stumped PS. maybe could someone suggest a new way to call this function because the window pops up every time a player enters the server Link to comment
Castillo Posted February 9, 2011 Share Posted February 9, 2011 You are using onClientPlayerResourceStart, WTF? that event doesn't exist, it's onClientResourceStart, also to hide it you gotta use guiSetVisible, btw i've tested your script and has no problems, the labels are in the TABS and nothing is wrong o_o. addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey ( "F1", "down", toggleHelp) end ) GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(171,158,452,337,"Help Menu",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(19,34,411,287,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(14,9,368,247,"1. Roleplay at ALL times, 2. Respect everyone we will not tolerate hostile behavior (occly) 3. No PowerGaming or MetaGaming 4. When pulling out a weapon you MUST use a /me to pull out the weapon/object 5. No Deathmatching 6. No cheats, hacks or bug abuse is allowed 7. No Ninja jacking, Pushing cars into the roads, or destorying cars occly 8. No vehicle sale scams 9. No advertising of other servers 10. Do not mix OOC chat with IC chat 11. No revenge killing \n\n**Any violation of the rules may result in a kick, jail time or even a ban! You have been warned.**",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",true) GUIEditor_Tab[2] = guiCreateTab("Commands",GUIEditor_TabPanel[1]) GUIEditor_Label[2] = guiCreateLabel(18,-4,5,5,"",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(16,9,369,247,"The following commands are already bound to your keyboard:\n\nt - IC Chat, only roleplayed chat should be used b - local OOC chat o - global OOC chat (if enabled) i - view your inventory f2 - brings up the report window __________________________________________________________________\n**Useful text commands (used with t)**\n/animlist - a list of animations /gate - opens doors (some are faction based) ",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",true) GUIEditor_Tab[3] = guiCreateTab("FAQ",GUIEditor_TabPanel[1]) scrollPane = guiCreateScrollPane(5,5,361,287,false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(17,13,361,243,"Q. I just started playing on the server, what can I do?\nA. In Strange Gaming you can do anything you set your mind to, want to be a multi millionaire tycoon? Start a business, want to be in the mafia? Find members and get involved. Most of these activities require you to visit the forums (StrangeGaming.tk) and join the specific group. \nQ. What's a faction? \nA. Factions are groups that roleplay a specific role with more in depth scripting oppertunities. Anyone can create a faction but to become official you must show longitivity and high roleplaying skill. \nQ. I found a bug, what do I do?\nA. Simply use f2 and report it to an admin to have it taken care of. \nQ. Whats Power Gaming? \nA. PowerGaming is forcing a player to roleplay your way with little to no roleplay.\nQ. What is MetaGaming?\nA. MetaGaming is using OOC information to benifit your player IC \nQ. What is revenge killing? \nA. Revenge killing is killing a player after he has RPly killed your character. When you die you should have no memory of your killer and go after him. If you must revenge your dealth find a good RP reason to if you can not DON'T DO IT.",false,scrollPane) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",true) GUIEditor_Tab[4] = guiCreateTab("Sources",GUIEditor_TabPanel[1]) GUIEditor_Label[5] = guiCreateLabel(17,11,360,248,"Forums: [url=http://www.StrangeGaming.tk]http://www.StrangeGaming.tk[/url] Developer: Lukkaz \n \nWe are looking for more scripters so if you are interested go on the forums and speak to Lukkaz and prove your scripting abilities for a position on the team!",false,GUIEditor_Tab[4]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",true) GUIEditor_Label[6] = guiCreateLabel(282,26,147,24,"Strange Gaming",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) function toggleHelp () if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- check if the gui element is visible guiSetVisible ( GUIEditor_Window[1], false ) -- if it is, we hide it showCursor(false) else guiSetVisible ( GUIEditor_Window[1], true ) -- if not, we make it visible showCursor(true) end end Screenshot showing that works fine: http://img547.imageshack.us/img547/7304 ... 023459.png Link to comment
Lukkaz Posted February 9, 2011 Author Share Posted February 9, 2011 Yeah it is in the tab but it doesn't scroll the text is cut off Link to comment
Castillo Posted February 9, 2011 Share Posted February 9, 2011 To use a scrollPane you need many labels, not just one, this works now. addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey ( "F1", "down", toggleHelp) end ) GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(171,158,452,337,"Help Menu",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_TabPanel[1] = guiCreateTabPanel(19,34,411,287,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(14,9,368,247,"1. Roleplay at ALL times, 2. Respect everyone we will not tolerate hostile behavior (occly) 3. No PowerGaming or MetaGaming 4. When pulling out a weapon you MUST use a /me to pull out the weapon/object 5. No Deathmatching 6. No cheats, hacks or bug abuse is allowed 7. No Ninja jacking, Pushing cars into the roads, or destorying cars occly 8. No vehicle sale scams 9. No advertising of other servers 10. Do not mix OOC chat with IC chat 11. No revenge killing \n\n**Any violation of the rules may result in a kick, jail time or even a ban! You have been warned.**",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",true) GUIEditor_Tab[2] = guiCreateTab("Commands",GUIEditor_TabPanel[1]) GUIEditor_Label[2] = guiCreateLabel(18,-4,5,5,"",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(16,9,369,247,"The following commands are already bound to your keyboard:\n\nt - IC Chat, only roleplayed chat should be used b - local OOC chat o - global OOC chat (if enabled) i - view your inventory f2 - brings up the report window __________________________________________________________________\n**Useful text commands (used with t)**\n/animlist - a list of animations /gate - opens doors (some are faction based) ",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",true) GUIEditor_Tab[3] = guiCreateTab("FAQ",GUIEditor_TabPanel[1]) scrollPane = guiCreateScrollPane(20,5,361,270,false,GUIEditor_Tab[3]) GUIEditor_Label[4] = guiCreateLabel(17,13,361,253,"Q. I just started playing on the server, what can I do?\nA. In Strange Gaming you can do anything you set your mind to, want to be a multi millionaire tycoon? Start a business, want to be in the mafia? Find members and get involved. Most of these activities require you to visit the forums (StrangeGaming.tk) and join the specific group. \nQ. What's a faction? \nA. Factions are groups that roleplay a specific role with more in depth scripting oppertunities. Anyone can create a faction but to become official you must show longitivity and high roleplaying skill. \nQ. I found a bug, what do I do?\nA. Simply use f2 and report it to an admin to have it taken care of. \nQ. Whats Power Gaming? \nA. PowerGaming is forcing a player to roleplay your way with little to no roleplay.",false,scrollPane) GUIEditor_Label[5] = guiCreateLabel(17,245,361,253,"Q. What is MetaGaming?\nA. MetaGaming is using OOC information to benifit your player IC \nQ. What is revenge killing? \nA. Revenge killing is killing a player after he has RPly killed your character. When you die you should have no memory of your killer and go after him. If you must revenge your dealth find a good RP reason to if you can not DON'T DO IT.",false,scrollPane) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",true) GUIEditor_Tab[4] = guiCreateTab("Sources",GUIEditor_TabPanel[1]) GUIEditor_Label[5] = guiCreateLabel(17,11,360,248,"Forums: [url=http://www.StrangeGaming.tk]http://www.StrangeGaming.tk[/url] Developer: Lukkaz \n \nWe are looking for more scripters so if you are interested go on the forums and speak to Lukkaz and prove your scripting abilities for a position on the team!",false,GUIEditor_Tab[4]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",true) GUIEditor_Label[6] = guiCreateLabel(282,26,147,24,"Strange Gaming",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) function toggleHelp () if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- check if the gui element is visible guiSetVisible ( GUIEditor_Window[1], false ) -- if it is, we hide it showCursor(false) else guiSetVisible ( GUIEditor_Window[1], true ) -- if not, we make it visible showCursor(true) end end Link to comment
Lukkaz Posted February 9, 2011 Author Share Posted February 9, 2011 I figured that's what it could have been but I wasn't sure if labels had a character limit, thanks 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