+ scaling to bars component
This commit is contained in:
parent
5090219976
commit
d525a24900
|
@ -8,6 +8,11 @@ local TOP_BAR_LINE_WIDTH = 48
|
||||||
|
|
||||||
local BOTTOM_BAR_HEIGTH = 128
|
local BOTTOM_BAR_HEIGTH = 128
|
||||||
|
|
||||||
|
local resx, resy = game.GetResolution();
|
||||||
|
local desw = 1080;
|
||||||
|
local desh = 1920;
|
||||||
|
local scale = 1;
|
||||||
|
|
||||||
local titleText = 'MODE SELECT'
|
local titleText = 'MODE SELECT'
|
||||||
local titleWidth = 250
|
local titleWidth = 250
|
||||||
|
|
||||||
|
@ -31,7 +36,12 @@ local set = function (title)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function resetLayoutInformation()
|
||||||
|
resx, resy = game.GetResolution()
|
||||||
|
desw = 1080
|
||||||
|
desh = 1920
|
||||||
|
scale = resx / desw
|
||||||
|
end
|
||||||
|
|
||||||
local drawLine = function(fx,fy,tx,ty,width,cr,cg,cb,ca)
|
local drawLine = function(fx,fy,tx,ty,width,cr,cg,cb,ca)
|
||||||
gfx.Save()
|
gfx.Save()
|
||||||
|
@ -117,7 +127,8 @@ end
|
||||||
|
|
||||||
local draw = function ()
|
local draw = function ()
|
||||||
gfx.Save()
|
gfx.Save()
|
||||||
resx, resy = game.GetResolution();
|
resetLayoutInformation()
|
||||||
|
gfx.Scale(scale, scale)
|
||||||
|
|
||||||
-- Draw top background
|
-- Draw top background
|
||||||
gfx.BeginPath();
|
gfx.BeginPath();
|
||||||
|
|
Loading…
Reference in New Issue