From 37127e7d25d003b2526f06fa894736abe80b8454 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Sat, 14 Jun 2025 20:02:12 +1200 Subject: queueTextForRender, starting character select, new character portraits - at least placeholders, the art is shit right now --- assets/scripts/mainMenu.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'assets/scripts/mainMenu.lua') diff --git a/assets/scripts/mainMenu.lua b/assets/scripts/mainMenu.lua index 11c583a..7ed16cc 100644 --- a/assets/scripts/mainMenu.lua +++ b/assets/scripts/mainMenu.lua @@ -5,22 +5,27 @@ buttonHeight = 50; buttonWidth = 110; bigButtonWidth = 150; bigButtonHeight = buttonHeight; +characterSelectType = "" function Setup() - setRenderPlayer(false) setBgImage("assets/backgrounds/city-background-1.png") end function Local2PButton() - reloadWithScript("assets/scripts/local2P.lua") + characterSelectType = "Local2P" + dofile("assets/scripts/character-select.lua") + Setup() end function MultiplayerButton() - -- Add C functions to reset Lua state and re-run Setup with different scripts + characterSelectType = "Multiplayer" + dofile("assets/scripts/multiplayer.lua") + Setup() end function SettingsButton() - -- Add C functions to reset Lua state and re-run Setup with different scripts + dofile("assets/scripts/settings.lua") + Setup() end function Update() @@ -28,7 +33,6 @@ function Update() queueButtonForRender("Local 2P", WIDTH // 2 - buttonWidth // 2, HEIGHT // 2 - buttonHeight // 2, buttonWidth, buttonHeight, "Local2PButton"); queueButtonForRender("Multiplayer", WIDTH // 2 - bigButtonWidth // 2, HEIGHT // 2 - bigButtonHeight // 2 + 55, bigButtonWidth, bigButtonHeight, "MultiplayerButton"); queueButtonForRender("Settings", WIDTH // 2 - buttonWidth // 2, HEIGHT // 2 - buttonHeight // 2 + 55 + 55, buttonWidth, buttonHeight, "SettingsButton"); - -- if keys[getKeycodeByName("RIGHT")] or keys[getKeycodeByName("D")] then -- movePlayer(movementSpeed, 0) -- end -- cgit v1.2.3