Compare commits

...

3 Commits

2 changed files with 17 additions and 8 deletions

Binary file not shown.

View File

@ -11,16 +11,23 @@ local compare = {
["OFF"] = -1
}
local heightFractions = {
["UPPER+"] = 2,
local portraitHeightFractions = {
["UPPER+"] = 2.4,
["UPPER"] = 3,
["STANDARD"] = 3.5,
["LOWER"] = 5,
["STANDARD"] = 4,
["LOWER"] = 5.3,
}
local landscapeHeightFractions = {
["UPPER+"] = 1.5,
["UPPER"] = 2.7,
["STANDARD"] = 5.1,
["LOWER"] = 6.7,
}
local earlyLateFor = compare[game.GetSkinSetting("gameplay_earlyLateFor")]
local msFor = compare[game.GetSkinSetting("gameplay_msFor")]
local heightFraction = heightFractions[game.GetSkinSetting("gameplay_earlyLatePosition")]
local earlyLatePosition = game.GetSkinSetting("gameplay_earlyLatePosition")
local EarlyLate = {
timer = 0,
@ -39,19 +46,21 @@ function EarlyLate.render(deltaTime)
local screenW, screenH = Dimensions.screen.width, Dimensions.screen.height
local screenCenterX = screenW / 2
local desh
local desh, fractionTable
if screenH > screenW then
desh = 1920
fractionTable = portraitHeightFractions
else
desh = 1080
fractionTable = landscapeHeightFractions
end
local scale = screenH / desh
local y = screenH / 8 * heightFraction
local y = screenH / 8 * fractionTable[earlyLatePosition]
gfx.BeginPath()
gfx.LoadSkinFont("Digital-Serial-Bold.ttf")
gfx.LoadSkinFont("Digital-Serial-ExtraBold.ttf")
gfx.FontSize(20 * scale)
if EarlyLate.showEarlyLate then