textboxes
This commit is contained in:
parent
8cec0ef36c
commit
5b4bd3c41c
13
game.lua
13
game.lua
|
@ -374,6 +374,19 @@ function Game:draw()
|
|||
love.graphics.setFont(FONT_STANDARD)
|
||||
love.graphics.print("FLOOR "..(self.floor>9 and self.floor or " "..self.floor).." POWER:"..player_power_to_string(self.player_power),1,249)
|
||||
|
||||
--tutorial textboxes
|
||||
local textboxes = self.level_data[self.floor].textboxes
|
||||
for i=1,#textboxes do
|
||||
love.graphics.setColor(0,0,0,1)
|
||||
love.graphics.rectangle("fill",textboxes[i].x,textboxes[i].y,textboxes[i].w,textboxes[i].h)
|
||||
love.graphics.setColor(1,1,1,1)
|
||||
love.graphics.rectangle("line",textboxes[i].x-1,textboxes[i].y-1,textboxes[i].w+2,textboxes[i].h+2)
|
||||
love.graphics.printf(
|
||||
textboxes[i].str,
|
||||
textboxes[i].x+1,textboxes[i].y+1,textboxes[i].w-2
|
||||
)
|
||||
end
|
||||
|
||||
--held item
|
||||
if self.player_item then
|
||||
love.graphics.draw(held_spr[self.player_item],72,250)
|
||||
|
|
|
@ -42,7 +42,13 @@ function LevelData.new()
|
|||
{type = "stairs_up", x = 8, y = 2},
|
||||
{type = "gate", x = 8, y = 3},
|
||||
},
|
||||
textboxes = {}
|
||||
textboxes = {
|
||||
{
|
||||
x = 10, y = 80,
|
||||
w = 80, h = 36,
|
||||
str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quis pretium ante, et consequat quam.",
|
||||
}
|
||||
}
|
||||
},
|
||||
{ --floor 2
|
||||
walls = {
|
||||
|
|
Loading…
Reference in New Issue