22
33local triggerKey = " tab" -- default button to open/close scoreboard
44local settingsKey = " F7" -- default button to open the settings window
5- local seperationSpace = 80 -- the space between top/bottom screen and scoreboard top/bottom in pixels
5+ local separationSpace = 80 -- the space between top/bottom screen and scoreboard top/bottom in pixels
66
77drawOverGUI = true -- draw scoreboard over gui?
88
@@ -538,7 +538,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
538538
539539 for key2 = 1 , # sortTableTeam do
540540 local value = sortTableTeam [key2 ]
541-
541+
542542 scoreboardContent [index ] = value
543543 index = index + 1
544544 end
@@ -701,7 +701,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
701701
702702 local partOfName = string.sub ( playerName , firstCodePos , secondCodePos )
703703 local textLength4 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
704-
704+
705705 dxDrawText ( partOfName , xPos + s (1 ), y + s (1 ), topX + x + s (1 + column .width ), y + s (11 )+ dxGetFontHeight ( fontscale (teamHeaderFont , scoreboardScale ), teamHeaderFont ), tocolor ( 0 , 0 , 0 , a or 255 ), fontscale (teamHeaderFont , s (1 )), teamHeaderFont , " left" , " top" , true , false , drawOverGUI )
706706 dxDrawText ( partOfName , xPos , y , topX + x + s (column .width ), y + dxGetFontHeight ( fontscale (teamHeaderFont , scoreboardScale ), teamHeaderFont ), tocolor ( r or 255 , g or 255 , b or 255 , a or 255 ), fontscale (teamHeaderFont , s (1 )), teamHeaderFont , " left" , " top" , true , false , drawOverGUI )
707707 xPos = xPos + textLength4
@@ -777,7 +777,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
777777 local firstPos = 1
778778 local partOfName = string.sub ( playerName , firstPos , secondPos )
779779 local textLength3 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
780-
780+
781781 dxDrawText ( partOfName , xPos + s (1 ), y + s (1 ), topX + x + s (1 + column .width ), y + s (11 )+ dxGetFontHeight ( fontscale (contentFont , scoreboardScale ), contentFont ), tocolor ( 0 , 0 , 0 , a or 255 ), fontscale (contentFont , s (1 )), contentFont , " left" , " top" , true , false , drawOverGUI )
782782 dxDrawText ( partOfName , xPos , y , topX + x + s (column .width ), y + dxGetFontHeight ( fontscale (contentFont , scoreboardScale ), contentFont ), tocolor ( r or 255 , g or 255 , b or 255 , a or 255 ), fontscale (contentFont , s (1 )), contentFont , " left" , " top" , true , false , drawOverGUI )
783783 xPos = xPos + textLength3
@@ -789,7 +789,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
789789
790790 local partOfName = string.sub ( playerName , firstCodePos , secondCodePos )
791791 local textLength2 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
792-
792+
793793 dxDrawText ( partOfName , xPos + s (1 ), y + s (1 ), topX + x + s (1 + column .width ), y + s (11 )+ dxGetFontHeight ( fontscale (contentFont , scoreboardScale ), contentFont ), tocolor ( 0 , 0 , 0 , a or 255 ), fontscale (contentFont , s (1 )), contentFont , " left" , " top" , true , false , drawOverGUI )
794794 dxDrawText ( partOfName , xPos , y , topX + x + s (column .width ), y + dxGetFontHeight ( fontscale (contentFont , scoreboardScale ), contentFont ), tocolor ( r or 255 , g or 255 , b or 255 , a or 255 ), fontscale (contentFont , s (1 )), contentFont , " left" , " top" , true , false , drawOverGUI )
795795 xPos = xPos + textLength2
@@ -880,7 +880,7 @@ function scoreboardAddColumn(name, width, friendlyName, priority, textFunction,
880880 textFunction = textFunction or nil
881881 fromResource = sourceResource or fromResource or nil
882882
883- if not (priority > MAX_PRIRORITY_SLOT or priority < 1 ) then
883+ if not (priority > MAX_PRIORITY_SLOT or priority < 1 ) then
884884
885885 for key = 1 , # scoreboardColumns do
886886 local value = scoreboardColumns [key ]
@@ -929,10 +929,10 @@ function scoreboardRemoveColumn(name)
929929
930930 for key = 1 , # scoreboardColumns do
931931 local value = scoreboardColumns [key ]
932-
932+
933933 if name == value .name then
934934 table.remove (scoreboardColumns , key )
935-
935+
936936 for resource , content in pairs (resourceColumns ) do
937937 table .removevalue (content , name )
938938 end
@@ -1062,7 +1062,7 @@ function scoreboardSetColumnPriority(name, priority)
10621062 return false
10631063 end
10641064
1065- if not (priority > MAX_PRIRORITY_SLOT or priority < 1 ) then
1065+ if not (priority > MAX_PRIORITY_SLOT or priority < 1 ) then
10661066 local columnIndex = false
10671067
10681068 for key = 1 , # scoreboardColumns do
@@ -1126,7 +1126,7 @@ function scoreboardGetTopCornerPosition()
11261126 local topX , topY = (sX / 2 ) - (calculateWidth ()/ 2 ), (sY / 2 ) - (calculateHeight ()/ 2 )
11271127
11281128 topY = topY - 15 -- Extra 15 pixels for the scroll up button
1129-
1129+
11301130 return math.floor (topX ), math.floor (topY + 1 )
11311131end
11321132
@@ -1136,7 +1136,7 @@ function scoreboardGetSize()
11361136 end
11371137
11381138 local width , height = calculateWidth (), calculateHeight ()
1139-
1139+
11401140 return width , height
11411141end
11421142
@@ -1214,7 +1214,7 @@ function math.clamp( low, value, high )
12141214end
12151215
12161216function fromcolor ( color )
1217- -- Propably not the most efficient way, but only way it works
1217+ -- Probably not the most efficient way, but only way it works
12181218 local colorCode = string.format ( " %x" , color )
12191219 local a = string.sub ( colorCode , 1 , 2 ) or " FF"
12201220 local r = string.sub ( colorCode , 3 , 4 ) or " FF"
@@ -1280,7 +1280,7 @@ end
12801280
12811281function getMaxPerWindow ()
12821282 local sX , sY = SCREEN_X , SCREEN_Y
1283- local availableHeight = sY - (seperationSpace * 2 )- s (5 )
1283+ local availableHeight = sY - (separationSpace * 2 )- s (5 )
12841284 if (serverInfo .server or serverInfo .players ) and showServerInfo then availableHeight = availableHeight - dxGetFontHeight ( fontscale (serverInfoFont , scoreboardScale ), serverInfoFont ) end
12851285 if (serverInfo .gamemode or serverInfo .map ) and showGamemodeInfo then availableHeight = availableHeight - dxGetFontHeight ( fontscale (serverInfoFont , scoreboardScale ), serverInfoFont ) end
12861286 availableHeight = availableHeight - s (3 )
0 commit comments