diff --git a/src/client/assets/CinzelDecorative-Black.otf b/src/client/assets/CinzelDecorative-Black.otf deleted file mode 100644 index e4aeef4..0000000 Binary files a/src/client/assets/CinzelDecorative-Black.otf and /dev/null differ diff --git a/src/client/assets/Montserrat-Bold.ttf b/src/client/assets/Montserrat-Bold.ttf new file mode 100644 index 0000000..efddc83 Binary files /dev/null and b/src/client/assets/Montserrat-Bold.ttf differ diff --git a/src/client/assets/client-icon.png b/src/client/assets/client-icon.png new file mode 100644 index 0000000..0329af9 Binary files /dev/null and b/src/client/assets/client-icon.png differ diff --git a/src/client/assets/client-icon.png-autosave.kra b/src/client/assets/client-icon.png-autosave.kra new file mode 100644 index 0000000..127c5f5 Binary files /dev/null and b/src/client/assets/client-icon.png-autosave.kra differ diff --git a/src/client/assets/client-icon.png~ b/src/client/assets/client-icon.png~ new file mode 100644 index 0000000..0329af9 Binary files /dev/null and b/src/client/assets/client-icon.png~ differ diff --git a/src/client/assets/strings.lua b/src/client/assets/strings.lua index ee18cf0..dc6ef64 100644 --- a/src/client/assets/strings.lua +++ b/src/client/assets/strings.lua @@ -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 } ) \ No newline at end of file diff --git a/src/client/ui/button.lua b/src/client/ui/button.lua index b130d5a..d7b4f5b 100644 --- a/src/client/ui/button.lua +++ b/src/client/ui/button.lua @@ -1,7 +1,7 @@ local lg = assert( love.graphics ) local button = { - h = lg.getFont():getHeight() + 12, + h = 60, y = 0, x = 0, w = 100, diff --git a/src/client/ui/mainmenu.lua b/src/client/ui/mainmenu.lua index 0c347a1..9b181ad 100644 --- a/src/client/ui/mainmenu.lua +++ b/src/client/ui/mainmenu.lua @@ -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 }, - } ) \ No newline at end of file + }, + + lg.newFont( "client/assets/Montserrat-Bold.ttf", 48 ) + ) \ No newline at end of file diff --git a/src/client/ui/menu.lua b/src/client/ui/menu.lua index 9615458..3320eca 100644 --- a/src/client/ui/menu.lua +++ b/src/client/ui/menu.lua @@ -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() diff --git a/src/client/ui/options.lua b/src/client/ui/options.lua index dfd2602..33a0c17 100644 --- a/src/client/ui/options.lua +++ b/src/client/ui/options.lua @@ -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 ) ) \ No newline at end of file diff --git a/src/conf.lua b/src/conf.lua index f972e67..eb64739 100644 --- a/src/conf.lua +++ b/src/conf.lua @@ -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) diff --git a/src/main.lua b/src/main.lua index 65418e6..620f5a7 100644 --- a/src/main.lua +++ b/src/main.lua @@ -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' )