2
2
3
3
local triggerKey = " tab" -- default button to open/close scoreboard
4
4
local 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
6
6
7
7
drawOverGUI = true -- draw scoreboard over gui?
8
8
@@ -538,7 +538,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
538
538
539
539
for key2 = 1 , # sortTableTeam do
540
540
local value = sortTableTeam [key2 ]
541
-
541
+
542
542
scoreboardContent [index ] = value
543
543
index = index + 1
544
544
end
@@ -701,7 +701,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
701
701
702
702
local partOfName = string.sub ( playerName , firstCodePos , secondCodePos )
703
703
local textLength4 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
704
-
704
+
705
705
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 )
706
706
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 )
707
707
xPos = xPos + textLength4
@@ -777,7 +777,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
777
777
local firstPos = 1
778
778
local partOfName = string.sub ( playerName , firstPos , secondPos )
779
779
local textLength3 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
780
-
780
+
781
781
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 )
782
782
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 )
783
783
xPos = xPos + textLength3
@@ -789,7 +789,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
789
789
790
790
local partOfName = string.sub ( playerName , firstCodePos , secondCodePos )
791
791
local textLength2 = dxGetTextWidth ( partOfName , fontscale (contentFont , s (1 )), contentFont )
792
-
792
+
793
793
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 )
794
794
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 )
795
795
xPos = xPos + textLength2
@@ -880,7 +880,7 @@ function scoreboardAddColumn(name, width, friendlyName, priority, textFunction,
880
880
textFunction = textFunction or nil
881
881
fromResource = sourceResource or fromResource or nil
882
882
883
- if not (priority > MAX_PRIRORITY_SLOT or priority < 1 ) then
883
+ if not (priority > MAX_PRIORITY_SLOT or priority < 1 ) then
884
884
885
885
for key = 1 , # scoreboardColumns do
886
886
local value = scoreboardColumns [key ]
@@ -929,10 +929,10 @@ function scoreboardRemoveColumn(name)
929
929
930
930
for key = 1 , # scoreboardColumns do
931
931
local value = scoreboardColumns [key ]
932
-
932
+
933
933
if name == value .name then
934
934
table.remove (scoreboardColumns , key )
935
-
935
+
936
936
for resource , content in pairs (resourceColumns ) do
937
937
table .removevalue (content , name )
938
938
end
@@ -1062,7 +1062,7 @@ function scoreboardSetColumnPriority(name, priority)
1062
1062
return false
1063
1063
end
1064
1064
1065
- if not (priority > MAX_PRIRORITY_SLOT or priority < 1 ) then
1065
+ if not (priority > MAX_PRIORITY_SLOT or priority < 1 ) then
1066
1066
local columnIndex = false
1067
1067
1068
1068
for key = 1 , # scoreboardColumns do
@@ -1126,7 +1126,7 @@ function scoreboardGetTopCornerPosition()
1126
1126
local topX , topY = (sX / 2 ) - (calculateWidth ()/ 2 ), (sY / 2 ) - (calculateHeight ()/ 2 )
1127
1127
1128
1128
topY = topY - 15 -- Extra 15 pixels for the scroll up button
1129
-
1129
+
1130
1130
return math.floor (topX ), math.floor (topY + 1 )
1131
1131
end
1132
1132
@@ -1136,7 +1136,7 @@ function scoreboardGetSize()
1136
1136
end
1137
1137
1138
1138
local width , height = calculateWidth (), calculateHeight ()
1139
-
1139
+
1140
1140
return width , height
1141
1141
end
1142
1142
@@ -1214,7 +1214,7 @@ function math.clamp( low, value, high )
1214
1214
end
1215
1215
1216
1216
function 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
1218
1218
local colorCode = string.format ( " %x" , color )
1219
1219
local a = string.sub ( colorCode , 1 , 2 ) or " FF"
1220
1220
local r = string.sub ( colorCode , 3 , 4 ) or " FF"
@@ -1280,7 +1280,7 @@ end
1280
1280
1281
1281
function getMaxPerWindow ()
1282
1282
local sX , sY = SCREEN_X , SCREEN_Y
1283
- local availableHeight = sY - (seperationSpace * 2 )- s (5 )
1283
+ local availableHeight = sY - (separationSpace * 2 )- s (5 )
1284
1284
if (serverInfo .server or serverInfo .players ) and showServerInfo then availableHeight = availableHeight - dxGetFontHeight ( fontscale (serverInfoFont , scoreboardScale ), serverInfoFont ) end
1285
1285
if (serverInfo .gamemode or serverInfo .map ) and showGamemodeInfo then availableHeight = availableHeight - dxGetFontHeight ( fontscale (serverInfoFont , scoreboardScale ), serverInfoFont ) end
1286
1286
availableHeight = availableHeight - s (3 )
0 commit comments