battlesystem: rework UI

This commit is contained in:
Kazhnuz 2019-03-31 10:15:27 +02:00
parent b86be58481
commit f155414c9d
3 changed files with 11 additions and 11 deletions

View file

@ -133,10 +133,10 @@ end
function ActorManager:draw() function ActorManager:draw()
for i,v in ipairs(self.actionlist) do for i,v in ipairs(self.actionlist) do
v.actor:drawIcon(4 + (i-1)*(20), 1) v.actor:drawIcon(4 + (i-1)*(20), 6)
end end
love.graphics.draw(self.cursorTexture, self.cursor * 20 - 6, 18, math.rad(-90), 1, 1, 4, 8) love.graphics.draw(self.cursorTexture, self.cursor * 20 - 6, 26, math.rad(-90), 1, 1, 4, 8)
end end
return ActorManager return ActorManager

View file

@ -12,7 +12,7 @@ local EmptyArena = {
local _GROUND_X, _GROUND_Y local _GROUND_X, _GROUND_Y
_GROUND_X = -8 _GROUND_X = -8
_GROUND_Y = 90 _GROUND_Y = 70
function BattleArena:new(controller) function BattleArena:new(controller)
self.controller = controller self.controller = controller
@ -152,20 +152,20 @@ end
function BattleArena:drawBackgrounds() function BattleArena:drawBackgrounds()
for i=1, 4 do for i=1, 4 do
if (i == 2) or (i == 4) then if (i == 2) or (i == 4) then
love.graphics.draw(self.textures.back1, (i)*240, 20, 0, -1, 1) love.graphics.draw(self.textures.back1, (i)*240, 0, 0, -1, 1)
else else
love.graphics.draw(self.textures.back1, (i-1)*240, 20, 0, 1, 1) love.graphics.draw(self.textures.back1, (i-1)*240, 0, 0, 1, 1)
end end
end end
for i=1, 3 do for i=1, 3 do
love.graphics.draw(self.textures.back2, (i-1)*240, 20, 0, 1, 1) love.graphics.draw(self.textures.back2, (i-1)*240, 0, 0, 1, 1)
end end
end end
function BattleArena:drawBorder() function BattleArena:drawBorder()
for i=1, 7 do for i=1, 7 do
love.graphics.draw(self.textures.borders, self.quads.borders, (i-1)*80, 80, 0, 1, 1) love.graphics.draw(self.textures.borders, self.quads.borders, (i-1)*80, 60, 0, 1, 1)
end end
end end

View file

@ -48,10 +48,10 @@ function BattleHUD:draw()
end end
function BattleHUD:drawFrame() function BattleHUD:drawFrame()
love.graphics.draw(self.hud1, 0, 0) love.graphics.draw(self.hud1, 424, 20, 0, -1, -1)
love.graphics.draw(self.hud7, -8, 22) love.graphics.draw(self.hud7, -8, 215)
love.graphics.draw(self.hud7, -8, 22 + 24) love.graphics.draw(self.hud7, -8 + 128 + 24, 215)
love.graphics.draw(self.hud7, -8 + 126 - 2, 23) love.graphics.draw(self.hud7, -8 + 256 + 48, 215)
--love.graphics.draw(self.hud2, 0, 200) --love.graphics.draw(self.hud2, 0, 200)
end end