Compare commits
3 Commits
962f2c27d7
...
b4f7709a3e
Author | SHA1 | Date |
---|---|---|
domdoc | b4f7709a3e | |
domdoc | d1d620a599 | |
domdoc | 39631eb320 |
Binary file not shown.
|
@ -11,16 +11,23 @@ local compare = {
|
||||||
["OFF"] = -1
|
["OFF"] = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
local heightFractions = {
|
local portraitHeightFractions = {
|
||||||
["UPPER+"] = 2,
|
["UPPER+"] = 2.4,
|
||||||
["UPPER"] = 3,
|
["UPPER"] = 3,
|
||||||
["STANDARD"] = 3.5,
|
["STANDARD"] = 4,
|
||||||
["LOWER"] = 5,
|
["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 earlyLateFor = compare[game.GetSkinSetting("gameplay_earlyLateFor")]
|
||||||
local msFor = compare[game.GetSkinSetting("gameplay_msFor")]
|
local msFor = compare[game.GetSkinSetting("gameplay_msFor")]
|
||||||
local heightFraction = heightFractions[game.GetSkinSetting("gameplay_earlyLatePosition")]
|
local earlyLatePosition = game.GetSkinSetting("gameplay_earlyLatePosition")
|
||||||
|
|
||||||
local EarlyLate = {
|
local EarlyLate = {
|
||||||
timer = 0,
|
timer = 0,
|
||||||
|
@ -39,19 +46,21 @@ function EarlyLate.render(deltaTime)
|
||||||
local screenW, screenH = Dimensions.screen.width, Dimensions.screen.height
|
local screenW, screenH = Dimensions.screen.width, Dimensions.screen.height
|
||||||
local screenCenterX = screenW / 2
|
local screenCenterX = screenW / 2
|
||||||
|
|
||||||
local desh
|
local desh, fractionTable
|
||||||
|
|
||||||
if screenH > screenW then
|
if screenH > screenW then
|
||||||
desh = 1920
|
desh = 1920
|
||||||
|
fractionTable = portraitHeightFractions
|
||||||
else
|
else
|
||||||
desh = 1080
|
desh = 1080
|
||||||
|
fractionTable = landscapeHeightFractions
|
||||||
end
|
end
|
||||||
|
|
||||||
local scale = screenH / desh
|
local scale = screenH / desh
|
||||||
local y = screenH / 8 * heightFraction
|
local y = screenH / 8 * fractionTable[earlyLatePosition]
|
||||||
|
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.LoadSkinFont("Digital-Serial-Bold.ttf")
|
gfx.LoadSkinFont("Digital-Serial-ExtraBold.ttf")
|
||||||
gfx.FontSize(20 * scale)
|
gfx.FontSize(20 * scale)
|
||||||
|
|
||||||
if EarlyLate.showEarlyLate then
|
if EarlyLate.showEarlyLate then
|
||||||
|
|
Loading…
Reference in New Issue