Properly display balls and strikes #3
|
@ -6,8 +6,9 @@ local ScoreboardHeight <const> = 55
|
|||
local Indicator = "> "
|
||||
local IndicatorWidth <const> = ScoreFont:getTextWidth(Indicator)
|
||||
|
||||
local BallStrikeMarginY <const> = 4
|
||||
local BallStrikeWidth <const> = 60
|
||||
local BallStrikeHeight <const> = 20
|
||||
local BallStrikeHeight <const> = (BallStrikeMarginY * 2) + ScoreFont:getHeight()
|
||||
|
||||
---@param teams any
|
||||
---@param battingTeam any
|
||||
|
@ -33,7 +34,7 @@ function drawBallsAndStrikes(x, y, balls, strikes)
|
|||
local text = tostring(balls) .. " - " .. tostring(strikes)
|
||||
local textWidth = ScoreFont:getTextWidth(text)
|
||||
local widthDiff = BallStrikeWidth - textWidth
|
||||
|
||||
ScoreFont:drawText(text, x + (widthDiff / 2), y + 4)
|
||||
ScoreFont:drawText(text, x + (widthDiff / 2), y + BallStrikeMarginY)
|
||||
gfx.setImageDrawMode(originalDrawMode)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Where does the magic 4 come from 🤔
You're honestly so real for that