mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 12:09:02 -06:00
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.
This commit is contained in:
parent
d68bd13d2a
commit
92d67968f5
@ -20,6 +20,7 @@ backgrounds = {
|
|||||||
love.graphics.newImage("res/backgrounds/1800.png"),
|
love.graphics.newImage("res/backgrounds/1800.png"),
|
||||||
love.graphics.newImage("res/backgrounds/1900.png"),
|
love.graphics.newImage("res/backgrounds/1900.png"),
|
||||||
title = love.graphics.newImage("res/backgrounds/title.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"),
|
title_night = love.graphics.newImage("res/backgrounds/title-night.jpg"),
|
||||||
snow = love.graphics.newImage("res/backgrounds/snow.png"),
|
snow = love.graphics.newImage("res/backgrounds/snow.png"),
|
||||||
input_config = love.graphics.newImage("res/backgrounds/options-input.png"),
|
input_config = love.graphics.newImage("res/backgrounds/options-input.png"),
|
||||||
|
BIN
res/backgrounds/title-no-icon.jpg
Normal file
BIN
res/backgrounds/title-no-icon.jpg
Normal file
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
|
else self.y_offset = 310 - self.frames end
|
||||||
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()
|
function TitleScene:render()
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
||||||
love.graphics.draw(
|
love.graphics.draw(
|
||||||
backgrounds["title"], -- title_night
|
backgrounds["title_no_icon"], -- title, title_night
|
||||||
0, 0, 0,
|
0, 0, 0,
|
||||||
0.5, 0.5
|
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(
|
love.graphics.draw(
|
||||||
misc_graphics["icon"],
|
misc_graphics["icon"],
|
||||||
460, 170, 0,
|
490, 192, 0,
|
||||||
2, 2
|
2, 2
|
||||||
)
|
)
|
||||||
]]
|
]]
|
||||||
|
Loading…
Reference in New Issue
Block a user