Skip to content

Commit 4d03485

Browse files
committed
Add combo percentage and invisible button in main menu.
1 parent 6a7a1ee commit 4d03485

File tree

6 files changed

+341
-884
lines changed

6 files changed

+341
-884
lines changed

game/live/result.lua

-286
This file was deleted.

game/states/main_menu_v31.lua

+13-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ local ripple = require("game.ui.ripple")
2222
-- These UIs are declared directly here because
2323
-- they're one-specific use. It's not worth to have it in separate file
2424
-- because they're not reusable
25-
25+
local invisibleButton = Luaoop.class("Livesim2.InvisibleButtonUI", glow.element)
2626
local playButton = Luaoop.class("Livesim2.MainMenu.PlayButton", glow.element)
27+
local changeUnitsButton = Luaoop.class("Livesim2.MainMenu.ChangeUnitsButton", glow.element)
28+
local settingsButton = Luaoop.class("Livesim2.MainMenu.SettingsButton", glow.element)
2729

2830
function playButton:new(state)
2931
local text = L"menu:play"
@@ -81,8 +83,6 @@ function playButton:render(x, y)
8183
end
8284
end
8385

84-
local changeUnitsButton = Luaoop.class("Livesim2.MainMenu.ChangeUnitsButton", glow.element)
85-
8686
function changeUnitsButton:new(state)
8787
local text = L"menu:changeUnits"
8888
self.image = state.assets.images.changeUnits
@@ -132,8 +132,6 @@ function changeUnitsButton:render(x, y)
132132
end
133133
end
134134

135-
local settingsButton = Luaoop.class("Livesim2.MainMenu.SettingsButton", glow.element)
136-
137135
function settingsButton:new(state)
138136
local text = L"menu:settings"
139137
self.image = state.assets.images.settingsDualGear
@@ -183,6 +181,12 @@ function settingsButton:render(x, y)
183181
end
184182
end
185183

184+
function invisibleButton:new(w, h)
185+
self.width, self.height = w, h
186+
end
187+
188+
function invisibleButton.render() end
189+
186190
-- End UI stuff
187191

188192
local function makeEnterGamestateFunction(name, noloading)
@@ -267,6 +271,10 @@ function mainMenu:load()
267271
if not(self.data.grayGradient) then
268272
self.data.grayGradient = util.gradient("vertical", color.transparent, color.hex6A6767F0)
269273
end
274+
275+
local invbtn = invisibleButton(240, 80)
276+
invbtn:addEventListener("mousereleased", makeEnterGamestateFunction("systemInfo", true))
277+
glow.addFixedElement(invbtn, 720, 560)
270278
end
271279

272280
-- Title text "{ffa73d}Live {ffffff}Simulator: {ff4fae}2" is in 38x584 (text "title")

0 commit comments

Comments
 (0)