diff options
| author | Arslaan Pathan <[email protected]> | 2025-06-12 20:22:40 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2025-06-12 20:22:40 +1200 |
| commit | 8c7dfa2167ca737e33947b98ed6c077351f6a2b6 (patch) | |
| tree | d14247b1256c3183536d53b96f8f1b8a5948ad35 /assets/scripts/mainMenu.lua | |
| parent | 444e8e362dd5aad6f620f7b9bbd79d40a6393314 (diff) | |
| download | showdownofthesticks-8c7dfa2167ca737e33947b98ed6c077351f6a2b6.tar.xz showdownofthesticks-8c7dfa2167ca737e33947b98ed6c077351f6a2b6.zip | |
Button is work, very very nice
Diffstat (limited to 'assets/scripts/mainMenu.lua')
| -rw-r--r-- | assets/scripts/mainMenu.lua | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/assets/scripts/mainMenu.lua b/assets/scripts/mainMenu.lua index 2f6b342..d08d82a 100644 --- a/assets/scripts/mainMenu.lua +++ b/assets/scripts/mainMenu.lua @@ -1,18 +1,29 @@ movementSpeed = 3; bannerTextureWidth = 509; +buttonHeight = 50; +buttonWidth = 110; +bigButtonWidth = 150; +bigButtonHeight = buttonHeight; function Setup() setRenderPlayer(false) setBgImage("assets/backgrounds/city-background-1.png") end -function TestButtonFunction() - setBgImage("assets/gui/mainMenu_banner.png") +function Local2PButton() +end + +function MultiplayerButton() +end + +function SettingsButton() end function Update() queueTextureForRender("assets/gui/mainMenu_banner.png", WIDTH // 2 - bannerTextureWidth // 2, 0) - queueButtonForRender("Local 2P", 0, 0, 100, 50, "TestButtonFunction"); + 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) |
