Tiny UI feature added to the title screen.
If you load a custom block skin, the title screen will use your skin to draw the logo.pull/54/head
parent
d68bd13d2a
commit
92d67968f5
|
@ -20,6 +20,7 @@ backgrounds = {
|
|||
love.graphics.newImage("res/backgrounds/1800.png"),
|
||||
love.graphics.newImage("res/backgrounds/1900.png"),
|
||||
title = love.graphics.newImage("res/backgrounds/title.png"),
|
||||
title_no_icon = love.graphics.newImage("res/backgrounds/title-no-icon.jpg"),
|
||||
title_night = love.graphics.newImage("res/backgrounds/title-night.jpg"),
|
||||
snow = love.graphics.newImage("res/backgrounds/snow.png"),
|
||||
input_config = love.graphics.newImage("res/backgrounds/options-input.png"),
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 343 KiB |
|
@ -60,18 +60,38 @@ function TitleScene:update()
|
|||
else self.y_offset = 310 - self.frames end
|
||||
end
|
||||
|
||||
local block_offsets = {
|
||||
{color = "M", x = 0, y = 0},
|
||||
{color = "G", x = 32, y = 0},
|
||||
{color = "Y", x = 64, y = 0},
|
||||
{color = "B", x = 0, y = 32},
|
||||
{color = "O", x = 0, y = 64},
|
||||
{color = "C", x = 32, y = 64},
|
||||
{color = "R", x = 64, y = 64}
|
||||
}
|
||||
|
||||
function TitleScene:render()
|
||||
love.graphics.setFont(font_3x5_4)
|
||||
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
||||
love.graphics.draw(
|
||||
backgrounds["title"], -- title_night
|
||||
backgrounds["title_no_icon"], -- title, title_night
|
||||
0, 0, 0,
|
||||
0.5, 0.5
|
||||
)
|
||||
|
||||
-- 490, 192
|
||||
for _, b in ipairs(block_offsets) do
|
||||
love.graphics.draw(
|
||||
blocks["2tie"][b.color],
|
||||
490 + b.x, 192 + b.y, 0,
|
||||
2, 2
|
||||
)
|
||||
end
|
||||
|
||||
--[[
|
||||
love.graphics.draw(
|
||||
misc_graphics["icon"],
|
||||
460, 170, 0,
|
||||
490, 192, 0,
|
||||
2, 2
|
||||
)
|
||||
]]
|
||||
|
|
Loading…
Reference in New Issue