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({
|
return setmetatable({
|
||||||
["newgame_button"] = "New game",
|
["newgame_button"] = "New Game",
|
||||||
["join_button"] = "Join server",
|
["join_button"] = "Join Server",
|
||||||
["quit_button"] = "Quit",
|
["quit_button"] = "Quit",
|
||||||
["option_button"] = "Settings",
|
["option_button"] = "Settings",
|
||||||
["mainmenu_button"] = "Main menu",
|
["mainmenu_button"] = "Main Menu",
|
||||||
["option_name"] = "Player name",
|
["option_name"] = "Player Name",
|
||||||
["option_pron"] = "Player pronouns",
|
["option_pron"] = "Player Pronouns",
|
||||||
["option_tint"] = "Player colour",
|
["option_tint"] = "Player Colour",
|
||||||
["option_keybinds"] = "Edit keybindings",
|
["option_keybinds"] = "Edit Keybindings",
|
||||||
}, {__index = function( t, k ) return k end } )
|
}, {__index = function( t, k ) return k end } )
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
local lg = assert( love.graphics )
|
local lg = assert( love.graphics )
|
||||||
local button = {
|
local button = {
|
||||||
h = lg.getFont():getHeight() + 12,
|
h = 60,
|
||||||
y = 0,
|
y = 0,
|
||||||
x = 0,
|
x = 0,
|
||||||
w = 100,
|
w = 100,
|
||||||
|
|
|
@ -11,7 +11,7 @@ return menu.new(
|
||||||
{
|
{
|
||||||
|
|
||||||
button{
|
button{
|
||||||
x = 15, w = lg.getWidth(), y = 115,
|
x = 15, w = lg.getWidth(), y = 115, h = 72,
|
||||||
text = strings.newgame_button,
|
text = strings.newgame_button,
|
||||||
color = { 0.6, 0.6, 0.6, 0.9 },
|
color = { 0.6, 0.6, 0.6, 0.9 },
|
||||||
callback = function() return scene.game() end },
|
callback = function() return scene.game() end },
|
||||||
|
@ -34,10 +34,10 @@ return menu.new(
|
||||||
},
|
},
|
||||||
|
|
||||||
lg.newMesh{
|
lg.newMesh{
|
||||||
{ 0, 0, 0, 0, 1, 1, 1, 0.01 },
|
{ 0, 0, 0, 0, 0.4, 0.1, 0.05, 0.0 },
|
||||||
{ 1, 0, 1, 0, 1, 1, 1, 0.1 },
|
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||||
{ 1, 1, 1, 1, 0, 0, 0, 0.1 },
|
{ 1, 1, 1, 1, 0.7, 0.4, 0.1, 0.8 },
|
||||||
{ 0, 1, 0, 1, 0, 0, 0, 0.01 },
|
{ 0, 1, 0, 1, 0.4, 0.1, 0.03, 0.0 },
|
||||||
},
|
},
|
||||||
|
|
||||||
lg.newMesh{
|
lg.newMesh{
|
||||||
|
@ -45,4 +45,7 @@ return menu.new(
|
||||||
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
{ 1, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||||
{ 1, 1, 1, 1, 0.7, 0.4, 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 },
|
{ 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 wWidth, wHeight
|
||||||
local currentMenu
|
local currentMenu
|
||||||
|
|
||||||
function menu.new( name, buttons, fg, bg )
|
function menu.new( name, buttons, fg, bg, font )
|
||||||
local t = { buttons = buttons, fg = fg, bg = bg }
|
local t = { buttons = buttons, fg = fg, bg = bg, font = font or lg.getFont() }
|
||||||
scene[name] = t
|
scene[name] = t
|
||||||
print( 'scene', scene )
|
print( 'scene', scene )
|
||||||
getmetatable( t ).__index = menu
|
getmetatable( t ).__index = menu
|
||||||
|
@ -21,6 +21,7 @@ end
|
||||||
function menu:onLoad()
|
function menu:onLoad()
|
||||||
print( 'loading:', self.name )
|
print( 'loading:', self.name )
|
||||||
currentMenu = self
|
currentMenu = self
|
||||||
|
lg.setFont( self.font )
|
||||||
return menu.resize( lg.getDimensions() )
|
return menu.resize( lg.getDimensions() )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -89,6 +90,7 @@ function menu.keypressed( key, code, isrepeat )
|
||||||
local button = buttons[selectedButtonIdx]
|
local button = buttons[selectedButtonIdx]
|
||||||
selectedButtonIdx = nil
|
selectedButtonIdx = nil
|
||||||
button.selected = false
|
button.selected = false
|
||||||
|
currentMenu:paint()
|
||||||
return button:callback()
|
return button:callback()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -127,8 +129,8 @@ function menu:paint()
|
||||||
|
|
||||||
local fg = self.fg
|
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( 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( 1, 3, 0.3 * ( 1 - v ), 0, 0, 0.4 * (1 - v) )
|
||||||
fg:setVertexAttribute( 4, 3, 1 - v, 0, 0, 0.1 * (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 )
|
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.draw( fg, 0, 0, 0, wWidth, wHeight )
|
||||||
lg.setCanvas()
|
lg.setCanvas()
|
||||||
|
|
|
@ -11,7 +11,7 @@ return menu.new(
|
||||||
{
|
{
|
||||||
|
|
||||||
button{
|
button{
|
||||||
x = 15, y = 115, w = 800,
|
x = 15, y = 115, w = 800, h = 30,
|
||||||
text = strings.mainmenu_button,
|
text = strings.mainmenu_button,
|
||||||
color = { 0.6, 0.6, 0.6, 0.8 },
|
color = { 0.6, 0.6, 0.6, 0.8 },
|
||||||
callback = function() return scene.mainmenu() end },
|
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 },
|
{ 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, 0, 1, 0, 0.8, 0.3, 0.1, 0.8 },
|
||||||
{ 1, 1, 1, 1, 0.7, 0.4, 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{
|
lg.newMesh{
|
||||||
{ 0, 0, 0, 0, 1, 1, 1, 0.01 },
|
{ 0, 0, 0, 0, 1, 1, 1, 0.01 },
|
||||||
{ 1, 0, 1, 0, 1, 1, 1, 0.1 },
|
{ 1, 0, 1, 0, 1, 1, 1, 0.1 },
|
||||||
{ 1, 1, 1, 1, 0, 0, 0, 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.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.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.width = 800 -- The window width (number)
|
||||||
t.window.height = 600 -- The window height (number)
|
t.window.height = 600 -- The window height (number)
|
||||||
t.window.borderless = false -- Remove all border visuals from the window (boolean)
|
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 )
|
local love = assert( love )
|
||||||
|
|
||||||
function love.load()
|
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' )
|
local scenes = assert( require 'client.scene' )
|
||||||
|
|
||||||
assert( require 'client.ui.options' )
|
assert( require 'client.ui.options' )
|
||||||
|
|
Loading…
Reference in New Issue