+ cursor to critline wip
This commit is contained in:
parent
580e0e2efe
commit
1f5b5c28b5
|
@ -59,7 +59,7 @@ function render(deltaTime)
|
|||
end
|
||||
|
||||
function render_crit_base(deltaTime)
|
||||
CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation);
|
||||
CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors);
|
||||
Console.render(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation);
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
local baseImage = gfx.CreateSkinImage("gameplay/crit_line/base.png", 0)
|
||||
local textImage = gfx.CreateSkinImage("gameplay/crit_line/text.png", 0)
|
||||
local cursorImage = gfx.CreateSkinImage("gameplay/crit_line/cursor.png", 0)
|
||||
|
||||
local CRITBAR_W = 1496
|
||||
local CRITBAR_H = 348
|
||||
|
@ -16,7 +17,28 @@ local setUpTransforms = function (x,y,rotation)
|
|||
gfx.Scale(scale,scale)
|
||||
end
|
||||
|
||||
local renderBase = function (deltaTime, centerX, centerY, rotation)
|
||||
local drawCursors = function (cursors)
|
||||
local cursorW = 598*0.2;
|
||||
local cursorH = 673*0.2;
|
||||
for i = 0, 1, 1 do
|
||||
gfx.Save();
|
||||
local cursor = cursors[i];
|
||||
gfx.BeginPath();
|
||||
gfx.SkewX(cursor.skew)
|
||||
gfx.ImageRect(
|
||||
cursor.pos - cursorW/2,
|
||||
-cursorH/2,
|
||||
cursorW,
|
||||
cursorH,
|
||||
cursorImage,
|
||||
cursor.alpha,
|
||||
0
|
||||
);
|
||||
gfx.Restore();
|
||||
end
|
||||
end
|
||||
|
||||
local renderBase = function (deltaTime, centerX, centerY, rotation, cursors)
|
||||
setUpTransforms(centerX, centerY, rotation)
|
||||
|
||||
gfx.BeginPath()
|
||||
|
@ -35,6 +57,8 @@ local renderBase = function (deltaTime, centerX, centerY, rotation)
|
|||
0
|
||||
);
|
||||
|
||||
drawCursors(cursors)
|
||||
|
||||
gfx.ResetTransform()
|
||||
end
|
||||
|
||||
|
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
Loading…
Reference in New Issue