Tweaked visuals.
This commit is contained in:
parent
fc0bd44a1c
commit
0ffba039b6
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
|
@ -1,11 +1,11 @@
|
|||
return setmetatable({
|
||||
["newgame_button"] = "New game",
|
||||
["join_button"] = "Join server",
|
||||
["newgame_button"] = "New Game",
|
||||
["join_button"] = "Join Server",
|
||||
["quit_button"] = "Quit",
|
||||
["option_button"] = "Settings",
|
||||
["mainmenu_button"] = "Main menu",
|
||||
["option_name"] = "Player name",
|
||||
["option_pron"] = "Player pronouns",
|
||||
["option_tint"] = "Player colour",
|
||||
["option_keybinds"] = "Edit keybindings",
|
||||
["mainmenu_button"] = "Main Menu",
|
||||
["option_name"] = "Player Name",
|
||||
["option_pron"] = "Player Pronouns",
|
||||
["option_tint"] = "Player Colour",
|
||||
["option_keybinds"] = "Edit Keybindings",
|
||||
}, {__index = function( t, k ) return k end } )
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
local lg = assert( love.graphics )
|
||||
local button = {
|
||||
h = lg.getFont():getHeight() + 12,
|
||||
h = 60,
|
||||
y = 0,
|
||||
x = 0,
|
||||
w = 100,
|
||||
|
|
|
@ -11,7 +11,7 @@ return menu.new(
|
|||
{
|
||||
|
||||
button{
|
||||
x = 15, w = lg.getWidth(), y = 115,
|
||||
x = 15, w = lg.getWidth(), y = 115, h = 72,
|
||||
text = strings.newgame_button,
|
||||
color = { 0.6, 0.6, 0.6, 0.9 },
|
||||
callback = function() return scene.game() end },
|
||||
|
@ -34,10 +34,10 @@ return menu.new(
|
|||
},
|
||||
|
||||
lg.newMesh{
|
||||
{ 0, 0, 0, 0, 1, 1, 1, 0.01 },
|
||||
{ 1, 0, 1, 0, 1, 1, 1, 0.1 },
|
||||
{ 1, 1, 1, 1, 0, 0, 0, 0.1 },
|
||||
{ 0, 1, 0, 1, 0, 0, 0, 0.01 },
|
||||
{ 0, 0, 0, 0, 0.4, 0.1, 0.05, 0.0 },
|
||||
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||
{ 1, 1, 1, 1, 0.7, 0.4, 0.1, 0.8 },
|
||||
{ 0, 1, 0, 1, 0.4, 0.1, 0.03, 0.0 },
|
||||
},
|
||||
|
||||
lg.newMesh{
|
||||
|
@ -45,4 +45,7 @@ return menu.new(
|
|||
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||
{ 1, 1, 1, 1, 0.7, 0.4, 0.1, 0.8 },
|
||||
{ 0, 1, 0, 1, 0.4, 0.05, 0.05, 0.1 },
|
||||
} )
|
||||
},
|
||||
|
||||
lg.newFont( "client/assets/Montserrat-Bold.ttf", 48 )
|
||||
)
|
|
@ -10,8 +10,8 @@ local canvas
|
|||
local wWidth, wHeight
|
||||
local currentMenu
|
||||
|
||||
function menu.new( name, buttons, fg, bg )
|
||||
local t = { buttons = buttons, fg = fg, bg = bg }
|
||||
function menu.new( name, buttons, fg, bg, font )
|
||||
local t = { buttons = buttons, fg = fg, bg = bg, font = font or lg.getFont() }
|
||||
scene[name] = t
|
||||
print( 'scene', scene )
|
||||
getmetatable( t ).__index = menu
|
||||
|
@ -21,6 +21,7 @@ end
|
|||
function menu:onLoad()
|
||||
print( 'loading:', self.name )
|
||||
currentMenu = self
|
||||
lg.setFont( self.font )
|
||||
return menu.resize( lg.getDimensions() )
|
||||
end
|
||||
|
||||
|
@ -89,6 +90,7 @@ function menu.keypressed( key, code, isrepeat )
|
|||
local button = buttons[selectedButtonIdx]
|
||||
selectedButtonIdx = nil
|
||||
button.selected = false
|
||||
currentMenu:paint()
|
||||
return button:callback()
|
||||
end
|
||||
|
||||
|
@ -127,8 +129,8 @@ function menu:paint()
|
|||
|
||||
local fg = self.fg
|
||||
fg:setVertexAttribute( 2, 3, v * (0.7 + 0.2 * r()), v * (0.1 + 0.4 * r()), v * (0.1 * r()), 1 )
|
||||
fg:setVertexAttribute( 1, 3, 1 - v, 0, 0, 0.1 * (1 - v) )
|
||||
fg:setVertexAttribute( 4, 3, 1 - v, 0, 0, 0.1 * (1 - v) )
|
||||
fg:setVertexAttribute( 1, 3, 0.3 * ( 1 - v ), 0, 0, 0.4 * (1 - v) )
|
||||
fg:setVertexAttribute( 4, 3, 0.3 * ( 1 - v ), 0, 0, 0.4 * (1 - v) )
|
||||
fg:setVertexAttribute( 3, 3, v * (0.7 + 0.2 * r()), v * (0.1 + 0.4 * r()), v * (0.1 * r()), 1 )
|
||||
lg.draw( fg, 0, 0, 0, wWidth, wHeight )
|
||||
lg.setCanvas()
|
||||
|
|
|
@ -11,7 +11,7 @@ return menu.new(
|
|||
{
|
||||
|
||||
button{
|
||||
x = 15, y = 115, w = 800,
|
||||
x = 15, y = 115, w = 800, h = 30,
|
||||
text = strings.mainmenu_button,
|
||||
color = { 0.6, 0.6, 0.6, 0.8 },
|
||||
callback = function() return scene.mainmenu() end },
|
||||
|
@ -47,12 +47,16 @@ return menu.new(
|
|||
{ 0, 0, 0, 0, 0.4, 0.1, 0.05, 0.0 },
|
||||
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||
{ 1, 1, 1, 1, 0.7, 0.4, 0.1, 0.8 },
|
||||
{ 0, 1, 0, 1, 0.4, 0.1, 0.03, 0.0 },},
|
||||
{ 0, 1, 0, 1, 0.4, 0.1, 0.03, 0.0 },
|
||||
},
|
||||
|
||||
|
||||
lg.newMesh{
|
||||
{ 0, 0, 0, 0, 1, 1, 1, 0.01 },
|
||||
{ 1, 0, 1, 0, 1, 1, 1, 0.1 },
|
||||
{ 1, 1, 1, 1, 0, 0, 0, 0.1 },
|
||||
{ 0, 1, 0, 1, 0, 0, 0, 0.01 },}
|
||||
{ 0, 1, 0, 1, 0, 0, 0, 0.01 },
|
||||
},
|
||||
|
||||
lg.newFont( "client/assets/Montserrat-Bold.ttf", 18 )
|
||||
)
|
|
@ -11,7 +11,7 @@ function love.conf(t)
|
|||
t.audio.mixwithsystem = true -- Keep background music playing when opening LOVE (boolean, iOS and Android only)
|
||||
|
||||
t.window.title = "vision-dajjal" -- The window title (string)
|
||||
t.window.icon = nil -- Filepath to an image to use as the window's icon (string)
|
||||
t.window.icon = "client/assets/client-icon.png" -- Filepath to an image to use as the window's icon (string)
|
||||
t.window.width = 800 -- The window width (number)
|
||||
t.window.height = 600 -- The window height (number)
|
||||
t.window.borderless = false -- Remove all border visuals from the window (boolean)
|
||||
|
|
|
@ -3,7 +3,7 @@ local shared = assert( require 'shared' )
|
|||
local love = assert( love )
|
||||
|
||||
function love.load()
|
||||
love.graphics.setNewFont( "client/assets/CinzelDecorative-Black.otf", 36 )
|
||||
love.graphics.setNewFont( "client/assets/Montserrat-Bold.ttf", 48 )
|
||||
local scenes = assert( require 'client.scene' )
|
||||
|
||||
assert( require 'client.ui.options' )
|
||||
|
|
Loading…
Reference in New Issue