Skip to content

Commit

Permalink
Update info.lua (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-budd authored Feb 2, 2025
1 parent 4169324 commit 6c42e82
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/Lua/Hooks/HUD/Drawers/info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local function HUD_InfoDrawer(v)
local slidein = MMHUD.xoffset

--Timer
--TODO: align this to middle of screen when I get home
do
local flash = false
local timetic = MM_N.time
Expand Down Expand Up @@ -41,6 +42,8 @@ local function HUD_InfoDrawer(v)

--rings
do
local x = 6*FU - slidein
local y = (splitscreen and 10 or 21)*FU
local yoff = 0
local rings = MM:GetPlayerRings(p)
if (MMHUD.info_slideout)
Expand All @@ -58,10 +61,10 @@ local function HUD_InfoDrawer(v)

rings = ($ - p.mm.ringspaid) + MMHUD.info_count

v.drawString(20*FU - slidein + (v.stringWidth(tostring(rings),0,"normal")*FU),
32*FU + yoff,
v.drawString(x + 14*FU + (v.stringWidth(tostring(rings),0,"normal")*FU),
y + 11*FU + yoff,
"+"..(p.mm.ringspaid - MMHUD.info_count),
V_SNAPTOLEFT|V_SNAPTOTOP|V_GREENMAP,
V_SNAPTOLEFT|V_SNAPTOTOP|V_GREENMAP|V_PERPLAYER,
"fixed-right"
)
end
Expand All @@ -70,19 +73,19 @@ local function HUD_InfoDrawer(v)
local origin_scale = FU*3/4

v.drawScaled(6*FU - slidein,
21*FU + yoff,
y + yoff,
FixedMul(origin_size, origin_scale),
v.cachePatch("MMRING"),
V_SNAPTOLEFT|V_SNAPTOTOP
V_SNAPTOLEFT|V_SNAPTOTOP|V_PERPLAYER
)
v.drawString(20*FU - slidein,
22*FU + yoff,
v.drawString(x + 14*FU,
y + FU + yoff,
rings,
V_SNAPTOLEFT|V_SNAPTOTOP,
V_SNAPTOLEFT|V_SNAPTOTOP|V_PERPLAYER,
"fixed"
)
end

end

return HUD_InfoDrawer,"gameandscores"
return HUD_InfoDrawer,"gameandscores"

0 comments on commit 6c42e82

Please sign in to comment.