mirror of
https://github.com/AverageConsumer/kanto-gear.git
synced 2026-08-28 18:24:42 +02:00
Fix Trainer badge texture reference
This commit is contained in:
@@ -1663,7 +1663,7 @@ return function(mod)
|
||||
G.setColor(tint[1], tint[2], tint[3], owned and 1 or 0.25)
|
||||
local x = math.floor(5 + (i - 1) * 134
|
||||
/ math.max(1, #badges - 1))
|
||||
G.draw(badgeAsset.image, quad, x, 56)
|
||||
G.draw(badgeAsset.img, quad, x, 56)
|
||||
else
|
||||
local x = math.floor(4 + (i - 1) * badgeGap)
|
||||
local nextX = math.floor(4 + i * badgeGap)
|
||||
|
||||
@@ -297,7 +297,7 @@ do
|
||||
}
|
||||
TrainerCard.new = function()
|
||||
badgeLoads = badgeLoads + 1
|
||||
local badges = { image = T.love.graphics.newImage({}), quads = {} }
|
||||
local badges = { img = T.love.graphics.newImage({}), quads = {} }
|
||||
for i = 0, 7 do
|
||||
badges.quads[i] = T.love.graphics.newQuad(0, i * 32 + 16,
|
||||
16, 16, 16, 256)
|
||||
@@ -307,6 +307,7 @@ do
|
||||
T.love.graphics.draw = function(image, quad, x, y, ...)
|
||||
if type(quad) == "table" and quad.w == 16 and quad.h == 16
|
||||
and y == 56 then
|
||||
assert(image ~= nil, "Trainer badge draw requires Recomp's texture")
|
||||
local _, _, _, alpha = T.love.graphics.getColor()
|
||||
badgeAlphas[#badgeAlphas + 1] = alpha
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user