Advertisement
Guest User

dddrdr

a guest
Aug 16th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.67 KB | None | 0 0
  1.  
  2. /*
  3. SilkBoard: Re-work
  4. */
  5.  
  6. if ( SERVER ) then
  7.  
  8. AddCSLuaFile( "cl_silkconfig.lua" )
  9. AddCSLuaFile()
  10.  
  11. return
  12. end
  13.  
  14. // Include the configuration file
  15. include( "cl_silkconfig.lua" )
  16.  
  17. /*
  18. Fonts
  19. */
  20.  
  21. surface.CreateFont( "SilkBoardFont",
  22. {
  23. font = "coolvetica",
  24. size = 21,
  25. weight = 100,
  26. underline = 1
  27. }
  28. )
  29.  
  30. surface.CreateFont( "SilkTitle",
  31. {
  32. font = "coolvetica",
  33. size = 58,
  34. weight = 100,
  35. underline = 1
  36. }
  37. )
  38.  
  39. // Materials
  40. local blurMat = Material( "pp/blurscreen" )
  41. local cornerMat = surface.GetTextureID( "gui/corner8" )
  42.  
  43.  
  44. /*
  45. Has ULX access?
  46. */
  47.  
  48. local function hasULXAccess( cmd )
  49.  
  50. return ( ulx && ULib.ucl.query( LocalPlayer(), "ulx " .. cmd, true ) )
  51. end
  52.  
  53.  
  54. local SILKBOARD_TAB = {
  55.  
  56. SortRows = function( self, name, desc )
  57.  
  58. for _, item in pairs( self.player_list.Items ) do
  59. item:SetColumnmInfo()
  60. end
  61.  
  62. self.player_list:SortByMember( name, desc )
  63. local items = self.player_list.Items
  64.  
  65. --
  66.  
  67. self.player_list:Clear()
  68.  
  69. --
  70.  
  71. for k, v in pairs( items ) do
  72.  
  73. self.player_list:AddItem( v )
  74. end
  75. end,
  76.  
  77. UpdateBoard = function( self )
  78.  
  79. local t = player.GetAll()
  80.  
  81. for i = 1, #t do
  82.  
  83. local ply = t[ i ]
  84. if ( IsValid( ply ) && self.row[ ply ] == nil ) then
  85.  
  86. local pan = vgui.Create( "DPanel" )
  87. pan.ply = ply
  88. pan:SetSize( self.player_list:GetWide(), 50 )
  89. pan.Paint = function( self, w, h )
  90.  
  91. if ( !IsValid( self.ply ) ) then
  92.  
  93. return
  94. end
  95.  
  96. local col = team.GetColor( self.ply:Team() )
  97.  
  98. -- Rounded box
  99. draw.RoundedBox( 8, 0, 0, w, h, Color( col.r, col.g, col.b, 150 ) )
  100. end
  101.  
  102. pan.m_expireTime = CurTime()
  103. pan.tab = {}
  104.  
  105. pan.SetColumnmInfo = function( self )
  106.  
  107. if ( !IsValid( self.ply ) ) then
  108. return
  109. end
  110.  
  111. self.tab[ "Name" ] = self.ply:Nick()
  112.  
  113. for k, v in pairs( SILKBOARD.config.tabs ) do
  114. self.tab[ v.title ] = v.func( self.ply )
  115. end
  116. end
  117.  
  118. pan.Think = function( self )
  119.  
  120. if ( CurTime() > self.m_expireTime ) then
  121.  
  122. if ( !IsValid( self.ply ) ) then
  123.  
  124. self:Remove()
  125.  
  126. if ( self.player_list != nil && self.player_list.VBar != nil && self.player_list.VBar:IsVisible() ) then
  127.  
  128. self.player_list.VBar:SetScroll( self.player_list.VBar:GetScroll() - 50 )
  129. end
  130.  
  131. return
  132. end
  133.  
  134. self.m_expireTime = CurTime() + 1
  135. end
  136. end
  137.  
  138. local avatar = pan:Add( "AvatarImage" )
  139. avatar:Dock( LEFT )
  140. avatar:SetContentAlignment( 4 )
  141. avatar:SetPlayer( ply, 40 )
  142. avatar:DockMargin( 5, 5, 5, 5 )
  143. avatar:SetSize( 40, 40 )
  144.  
  145. // Name and rank
  146. local nameSpace = ( self:GetWide() - 2 ) * 0.2
  147. local ply_col = {}
  148.  
  149. local tab = pan:Add( "DPanel" )
  150. tab:SetDrawBackground( false )
  151. tab:Dock( LEFT )
  152. tab:SetSize( nameSpace, 50 )
  153. tab:DockMargin( 6, 0, 0, 0 )
  154. tab:SetContentAlignment( 4 )
  155.  
  156. local lab = tab:Add( "DLabel" )
  157. lab:SetFont( "SilkBoardFont" )
  158. lab:SetTextColor( color_white )
  159. lab:Dock( TOP )
  160. lab:SetHeight( 50 )
  161. lab:SetContentAlignment( 4 )
  162. lab:DockMargin( 0, 0, 0, 0 )
  163. lab:SetText( "" )
  164.  
  165. lab.m_expireTime = CurTime()
  166.  
  167. lab.Think = function( self_lab )
  168.  
  169. if ( CurTime() > self_lab.m_expireTime ) then
  170.  
  171. self_lab.m_expireTime = CurTime() + 2
  172.  
  173. if ( IsValid( ply ) ) then
  174.  
  175. local str
  176.  
  177. if ( SILKBOARD.config.showRankUnderName && ply.GetUserGroup ) then
  178. str = ply:Nick() .. "\n" .. ( SILKBOARD.config.rankNames[ ply:GetUserGroup() ] or ply:GetUserGroup() )
  179. else
  180. str = ply:Nick()
  181. end
  182.  
  183. if ( self_lab.m_Nick != str ) then
  184.  
  185. self_lab:SetText( str )
  186. self_lab.m_Nick = str
  187.  
  188. if ( SILKBOARD.config.enableTabAutoSort && SILKBOARD.config.tabToAutoSort == "Name" ) then
  189. self:SortRows( "Name", true )
  190. end
  191. end
  192. end
  193. end
  194. end
  195.  
  196. for k = 1, #SILKBOARD.config.tabs do
  197.  
  198. local v = SILKBOARD.config.tabs[ k ]
  199. ply_col[ k ] = pan:Add( "DPanel" )
  200.  
  201. local width = math.floor( ( self:GetWide() - ( 82 + nameSpace ) ) * v.size )
  202.  
  203.  
  204. local tab = ply_col[ k ]
  205. tab:SetDrawBackground( false )
  206. tab:Dock( LEFT )
  207. tab:SetSize( width, 50 )
  208. tab:SetContentAlignment( 4 )
  209.  
  210. tab.label = tab:Add( "DLabel" )
  211. tab.label:SetFont( "SilkBoardFont" )
  212. tab.label:SetTextColor( color_white )
  213. tab.label:Dock( FILL )
  214. tab.label:SetHeight( 50 )
  215. tab.label:SetContentAlignment( 5 )
  216. tab.label:DockMargin( 0, 0, 0, 0 )
  217. tab.label:SetText( v.title )
  218.  
  219. tab.label.m_expireTime = CurTime()
  220.  
  221. tab.label.Think = function( self_lab )
  222.  
  223. if ( CurTime() > self_lab.m_expireTime ) then
  224.  
  225. self_lab.m_expireTime = CurTime() + 2
  226.  
  227. if ( IsValid( ply ) ) then
  228.  
  229. local str = v.func( ply )
  230.  
  231. if ( str != self_lab.m_text ) then
  232.  
  233. self_lab.m_text = str
  234. self_lab:SetText( str )
  235.  
  236. if ( SILKBOARD.config.enableTabAutoSort && SILKBOARD.config.tabToAutoSort == v.title ) then
  237. self:SortRows( v.title, true )
  238. end
  239. end
  240. end
  241. end
  242. end
  243. end
  244.  
  245. local muteB = pan:Add( "DImageButton" )
  246. if ( ply:IsMuted() ) then
  247. muteB:SetImage( "icon16/sound_mute.png" )
  248. muteB.muted = true
  249. else
  250. muteB:SetImage( "icon16/sound_low.png" )
  251. muteB.muted = false
  252. end
  253. muteB.DoClick = function()
  254. if ( ply:IsMuted() ) then
  255. ply:SetMuted( false )
  256. muteB:SetImage( "icon16/sound_low.png" )
  257. muteB.muted = false
  258. else
  259. ply:SetMuted( true )
  260. muteB:SetImage( "icon16/sound_mute.png" )
  261. muteB.muted = true
  262. end
  263. end
  264. muteB.m_expireTime = CurTime()
  265. muteB.Think = function( self )
  266.  
  267. if ( CurTime() > muteB.m_expireTime ) then
  268.  
  269. muteB.m_expireTime = CurTime() + 5
  270.  
  271. if ( !IsValid( ply ) ) then return end
  272.  
  273. --
  274.  
  275. if ( ply:IsMuted() && !self.muted ) then
  276.  
  277. self:SetImage( "icon16/sound_mute.png" )
  278. self.muted = true
  279. elseif ( !ply:IsMuted() && self.muted ) then
  280.  
  281. self:SetImage( "icon16/sound_low.png" )
  282. self.muted = false
  283. end
  284. end
  285. end
  286.  
  287. local clickB = pan:Add( "DImageButton" )
  288. clickB.DoClick = function()
  289.  
  290. local menu = DermaMenu()
  291. local cat = {}
  292.  
  293. for k = 1, #SILKBOARD.config.commands do
  294.  
  295. local v = SILKBOARD.config.commands[ k ]
  296.  
  297. if ( v.ulxCMD && v.ulxCMD != "" && ( ( not SILKBOARD.config.enableULXOptions ) || not hasULXAccess( v.ulxCMD ) ) ) then continue end
  298. if ( pan.ply == LocalPlayer() && ( v.ulxCMD == "goto" || v.ulxCMD == "bring" ) ) then continue end
  299.  
  300. local opt
  301.  
  302. if ( v.category != nil ) then
  303.  
  304. if ( cat[ v.category ] == nil ) then
  305.  
  306. local menuOpt
  307. cat[ v.category ], menuOpt = menu:AddSubMenu( v.category )
  308.  
  309. local icon = SILKBOARD.config.category_icons[ v.category ]
  310.  
  311. if ( icon != nil ) then
  312.  
  313. menuOpt:SetIcon( icon )
  314. end
  315. end
  316.  
  317. opt = cat[ v.category ]:AddOption( v.name )
  318.  
  319. if ( v.spacer ) then
  320. cat[ v.category ]:AddSpacer()
  321. end
  322. else
  323. opt = menu:AddOption( v.name )
  324.  
  325. if ( v.spacer ) then
  326. menu:AddSpacer()
  327. end
  328. end
  329.  
  330. opt:SetIcon( v.icon )
  331.  
  332. if ( v.q ) then
  333.  
  334. opt.DoClick = function() Derma_StringRequest( v.name, v.q, "", function( a ) if ( type( tonumber( a ) ) == "number" ) then RunConsoleCommand( "ulx", v.ulxCMD, pan.ply:Nick(), tonumber( a ) ) end end ) end
  335. else
  336.  
  337. opt.DoClick = function() if ( v.func ) then v.func( pan.ply ) else RunConsoleCommand( "ulx", v.ulxCMD, pan.ply:Nick() ) end end
  338. end
  339. end
  340.  
  341. menu:Open()
  342. menu.Think = function()
  343. if ( !SILKBOARD.frame:IsVisible() || !pan.ply:IsValid() ) then
  344. menu:Remove()
  345. end
  346. end
  347.  
  348. --
  349.  
  350. menu:AddSpacer()
  351.  
  352. --
  353.  
  354. menu:Open()
  355. menu.Think = function()
  356. if ( !self:IsVisible() || !pan.ply:IsValid() ) then
  357. menu:Remove()
  358. end
  359. end
  360. end
  361.  
  362.  
  363. pan.PerformLayout = function( self_panel )
  364.  
  365. clickB:SetSize( self_panel:GetWide() - 84, 50 )
  366. clickB:SetPos( 50, 0 )
  367.  
  368. muteB:SetSize( 16, 16 )
  369. muteB:SetPos( self_panel:GetWide() - 24, pan:GetTall()/2 - 8 )
  370.  
  371.  
  372. local nameSpace = ( self:GetWide() - 2 ) * 0.2
  373. tab:SetSize( nameSpace, 50 )
  374.  
  375. for k = 1, #SILKBOARD.config.tabs do
  376.  
  377. local v = SILKBOARD.config.tabs[ k ]
  378. local width = math.floor( ( self:GetWide() - ( 82 + nameSpace ) ) * v.size )
  379.  
  380. ply_col[ k ]:SetSize( width, 50 )
  381. end
  382. end
  383.  
  384. self.player_list:AddItem( pan )
  385. self.row[ pan.ply ] = pan
  386. end
  387. end
  388. end,
  389.  
  390. Init = function( self )
  391.  
  392. // For the player rows
  393. self.row = {}
  394.  
  395. self.Header = self:Add( "DPanel" )
  396. self.Header:Dock( TOP )
  397. self.Header:SetHeight( 100 )
  398. self.Header:SetDrawBackground( false )
  399.  
  400. self.Name = self.Header:Add( "DLabel" )
  401. self.Name:SetFont( "SilkTitle" )
  402. self.Name:SetTextColor( SILKBOARD.config.titleColor )
  403. self.Name:Dock( TOP )
  404. self.Name:SetHeight( 100 )
  405. self.Name:SetContentAlignment( 5 )
  406. self.Name:SetExpensiveShadow( 3, Color( 0, 0, 0, 200 ) )
  407. self.Name:DockMargin( 0, 0, 0, 0 )
  408.  
  409.  
  410. self.topPanel = self:Add( "DPanel" )
  411. self.topPanel:Dock( TOP )
  412. self.topPanel:DockMargin( 0, 2, 0, 0 )
  413. self.topPanel:SetHeight( 25 )
  414. self.topPanel:SetDrawBackground( false )
  415.  
  416. self.nameButton = vgui.Create( "DImageButton", self.topPanel )
  417. self.nameButton:Dock( LEFT )
  418. self.nameButton:SetHeight( 25 )
  419. self.nameButton:SetContentAlignment( 4 )
  420. self.nameButton:DockMargin( 58, 0, 0, 0 )
  421. self.nameButton:SetDrawBackground( false )
  422.  
  423. self.nameButton.click = true
  424.  
  425. self.nameButton.DoClick = function( b_me )
  426. self:SortRows( "Name", !b_me.click )
  427. end
  428.  
  429. self.nameLabel = self.nameButton:Add( "DLabel" )
  430. self.nameLabel:SetFont( "SilkBoardFont" )
  431. self.nameLabel:SetTextColor( color_white )
  432. self.nameLabel:Dock( FILL )
  433. self.nameLabel:SetHeight( 25 )
  434. self.nameLabel:SetContentAlignment( 4 )
  435. self.nameLabel:DockMargin( 0, 0, 0, 0 )
  436.  
  437.  
  438. self.button_tabs = {}
  439.  
  440. for k, v in pairs( SILKBOARD.config.tabs ) do
  441.  
  442. self.button_tabs[ k ] = self.topPanel:Add( "DImageButton" )
  443.  
  444. local tab = self.button_tabs[ k ]
  445. tab:Dock( LEFT )
  446. tab:SetHeight( 25 )
  447. tab:SetContentAlignment( 4 )
  448. tab:SetDrawBackground( false )
  449.  
  450. tab.click = true
  451.  
  452. tab.DoClick = function( self_button )
  453.  
  454. self:SortRows( v.title, !self_button.click )
  455. end
  456.  
  457. tab.label = tab:Add( "DLabel" )
  458. tab.label:SetFont( "SilkBoardFont" )
  459. tab.label:SetTextColor( color_white )
  460. tab.label:Dock( FILL )
  461. tab.label:SetHeight( 25 )
  462. tab.label:SetContentAlignment( 5 )
  463. tab.label:DockMargin( 0, 0, 0, 0 )
  464. end
  465.  
  466.  
  467.  
  468. self.player_list = self:Add( "DPanelList" )
  469. self.player_list:SetSpacing( 2 )
  470. self.player_list:EnableHorizontal( false )
  471. self.player_list:EnableVerticalScrollbar( false )
  472. self.player_list:Dock( TOP )
  473. self.player_list:DockMargin( 2, 2, 2, 2 )
  474.  
  475. self.player_list.SortByMember = function( self_plist, key, desc )
  476.  
  477. table.sort( self_plist.Items, function( a, b )
  478.  
  479. if ( a == nil || b == nil ) then return end
  480. if ( a.tab[ key ] == nil ) then return false end
  481. if ( b.tab[ key ] == nil ) then return true end
  482.  
  483. if ( key == "Name" ) then
  484.  
  485. self.nameButton.click = desc
  486. else
  487.  
  488. for k = 1, #SILKBOARD.config.tabs do
  489.  
  490. local v = SILKBOARD.config.tabs[ k ]
  491. if ( v.title == key ) then
  492.  
  493. self.button_tabs[ k ].click = desc
  494. break
  495. end
  496. end
  497. end
  498.  
  499. if ( desc ) then
  500.  
  501. return ( b.tab[ key ] > a.tab[ key ] )
  502. end
  503.  
  504. return ( a.tab[ key ] > b.tab[ key ] )
  505. end )
  506. end
  507.  
  508. self.player_list.VBar.Paint = function() return true end
  509. self.player_list.VBar.btnUp.Paint = function() return true end
  510. self.player_list.VBar.btnDown.Paint = function() return true end
  511. self.player_list.VBar.btnGrip.Paint = function() return true end
  512.  
  513. function self.player_list.VBar.btnGrip:OnMousePressed() return true end
  514.  
  515. function self.player_list.VBar:OnScrollbarAppear() return true end
  516. function self.player_list.VBar:OnMousePressed() return true end
  517. function self.player_list.VBar:OnMouseReleased() return true end
  518.  
  519.  
  520. self.footer = self:Add( "DPanel" )
  521. self.footer:SetDrawBackground( false )
  522. self.footer:Dock( TOP )
  523. self.footer:SetHeight( 25 )
  524. self.footer:DockMargin( 0, 2, 0, 0 )
  525.  
  526.  
  527. local count_lab = self.footer:Add( "DLabel" )
  528. count_lab:SetFont( "SilkBoardFont" )
  529. count_lab:SetTextColor( SILKBOARD.config.footerTextColor )
  530. count_lab:SetText( "" )
  531. count_lab:SizeToContents()
  532. count_lab:Dock( LEFT )
  533. count_lab:SetHeight( 25 )
  534. count_lab:SetContentAlignment( 5 )
  535. count_lab:DockMargin( 4, 0, 0, 0 )
  536. count_lab.m_expireTime = CurTime()
  537. count_lab.Think = function( self )
  538.  
  539. if ( CurTime() > self.m_expireTime ) then
  540.  
  541. self.m_expireTime = CurTime() + 2
  542.  
  543. local str = ( #player.GetAll() .. "/" .. game.MaxPlayers() )
  544. if ( self.m_text != str ) then
  545.  
  546. self.m_text = str
  547. count_lab:SetText( str )
  548. count_lab:SizeToContents()
  549. end
  550. end
  551. end
  552.  
  553. local lab = self.footer:Add( "DLabel" )
  554. lab:SetFont( "SilkBoardFont" )
  555. lab:SetTextColor( SILKBOARD.config.footerTextColor )
  556. lab:SetText( SILKBOARD.config.footerText )
  557. lab:SizeToContents()
  558. lab:Dock( RIGHT )
  559. lab:SetHeight( 25 )
  560. lab:SetContentAlignment( 5 )
  561. lab:DockMargin( 0, 0, 4, 0 )
  562. end,
  563.  
  564. PerformLayout = function( self )
  565.  
  566. self:SetSize( ScrW() * 0.70, ScrH() * 0.95 )
  567. self:Center()
  568.  
  569. // Set the scoreboard title
  570. self.Name:SetText( SILKBOARD.config.title )
  571.  
  572. local nameSpace = ( self:GetWide() - 2 ) * 0.2
  573. self.nameButton:SetWidth( nameSpace )
  574.  
  575. // Set the column titles
  576. for k = 1, #SILKBOARD.config.tabs do
  577.  
  578. local v = SILKBOARD.config.tabs[ k ]
  579. local width = math.floor( ( self:GetWide() - ( 82 + nameSpace ) ) * v.size )
  580.  
  581. self.button_tabs[ k ]:SetWidth( width )
  582. self.button_tabs[ k ].label:SetText( v.title )
  583. end
  584.  
  585.  
  586. if ( SILKBOARD.config.showRankUnderName ) then
  587. self.nameLabel:SetText( "Name/Rank" )
  588. else
  589. self.nameLabel:SetText( "Name" )
  590. end
  591.  
  592. self.player_list:SetHeight( self:GetTall() - 158 )
  593. self.player_list.pnlCanvas.GetWide = function()
  594. return self.player_list:GetWide()
  595. end
  596. end,
  597.  
  598. Paint = function( self, w, h )
  599.  
  600. // Background
  601. local x, y = self:LocalToScreen( 0, 0 )
  602.  
  603. surface.SetMaterial( blurMat )
  604. surface.SetDrawColor( 255, 255, 255, 255 )
  605.  
  606. for i = 0, 4 do
  607. blurMat:SetFloat( "$blur", 1.5 )
  608. blurMat:Recompute()
  609. render.UpdateScreenEffectTexture()
  610. surface.DrawTexturedRect( -x, -y, ScrW(), ScrH() )
  611. end
  612.  
  613. draw.RoundedBox( 0, 0, 129, w, h - ( 100 + 29 + 25 ), Color( 10, 10, 10, 150 ) )
  614.  
  615.  
  616. // Header
  617. draw.RoundedBox( 0, 4, 0, w - 8, 4, Color( 35, 35, 35, 240 ) )
  618. draw.RoundedBox( 0, 0, 4, w, 100 - 4, Color( 35, 35, 35, 240 ) )
  619. draw.RoundedBox( 0, 0, 102, w, 25, Color( 35, 35, 35, 240 ) )
  620.  
  621.  
  622. surface.SetDrawColor( 35, 35, 35, 240 )
  623. surface.SetTexture( cornerMat )
  624.  
  625. surface.DrawTexturedRectUV( 0, 0, 4, 4, 0, 0, 1, 1 )
  626. surface.DrawTexturedRectUV( w - 4, 0, 4, 4, 1, 0, 0, 1 )
  627.  
  628.  
  629. // Footer
  630. draw.RoundedBox( 0, 0, h - 25, w, 21, Color( 35, 35, 35, 245 ) )
  631. draw.RoundedBox( 0, 4, h - 4, w - 8, 4, Color( 35, 35, 35, 245 ) )
  632.  
  633. --
  634.  
  635. surface.SetDrawColor( 35, 35, 35, 245 )
  636. surface.SetTexture( cornerMat )
  637.  
  638. surface.DrawTexturedRectUV( 0, h - 4, 4, 4, 0, 1, 1, 0 )
  639. surface.DrawTexturedRectUV( w - 4, h - 4, 4, 4, 1, 1, 0, 0 )
  640. end,
  641. }
  642.  
  643.  
  644. local SILK_BOARD = vgui.RegisterTable( SILKBOARD_TAB, "EditablePanel" )
  645. local silkboard = nil
  646.  
  647. /*
  648. Hide the default scoreboard
  649. */
  650.  
  651. hook.Add( "InitPostEntity", "initSilkBoard", function()
  652.  
  653. // For DarkRP
  654. hook.Remove( "ScoreboardShow", "FAdmin_scoreboard" )
  655. hook.Remove( "ScoreboardHide", "FAdmin_scoreboard" )
  656.  
  657. function GAMEMODE:ScoreboardShow()
  658.  
  659. if ( !IsValid( silkboard ) ) then
  660.  
  661. silkboard = vgui.CreateFromTable( SILK_BOARD )
  662. silkboard:SetSize( ScrW() * 0.70, ScrH() * 0.95 )
  663. silkboard:MakePopup()
  664. silkboard:SetKeyboardInputEnabled( false )
  665.  
  666. // Force update the board
  667. silkboard:UpdateBoard()
  668.  
  669. // Destroy the timer if it already exists
  670. timer.Destroy( "SILKBOARD_UPDATE_INFO" )
  671.  
  672. // Update the scoreboard every second
  673. timer.Create( "SILKBOARD_UPDATE_INFO", 1, 0, function()
  674.  
  675. if ( IsValid( silkboard ) ) then
  676. silkboard:UpdateBoard()
  677. else
  678. timer.Destroy( "SILKBOARD_UPDATE_INFO" )
  679. end
  680. end )
  681. else
  682.  
  683. silkboard:Show()
  684. RestoreCursorPosition()
  685.  
  686. --
  687.  
  688. if ( SILKBOARD.config.glideAnimation ) then
  689. silkboard:SetPos( 0, ScrH() / 2 - ( ( ScrH() * 0.95 ) / 2 ) )
  690. silkboard:MoveTo( ScrW() / 2 - ( ( ScrW() * 0.7 ) / 2 ), ScrH() / 2 - ( ScrH() * 0.95 ) / 2, 0.2, 0, 1 )
  691. end
  692. end
  693. end
  694.  
  695. function GAMEMODE:ScoreboardHide()
  696.  
  697. if ( IsValid( silkboard ) ) then
  698.  
  699. RememberCursorPosition()
  700. silkboard:Hide()
  701. end
  702. end
  703. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement