@@ -22,8 +22,10 @@ local ripple = require("game.ui.ripple")
22
22
-- These UIs are declared directly here because
23
23
-- they're one-specific use. It's not worth to have it in separate file
24
24
-- because they're not reusable
25
-
25
+ local invisibleButton = Luaoop . class ( " Livesim2.InvisibleButtonUI " , glow . element )
26
26
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 )
27
29
28
30
function playButton :new (state )
29
31
local text = L " menu:play"
@@ -81,8 +83,6 @@ function playButton:render(x, y)
81
83
end
82
84
end
83
85
84
- local changeUnitsButton = Luaoop .class (" Livesim2.MainMenu.ChangeUnitsButton" , glow .element )
85
-
86
86
function changeUnitsButton :new (state )
87
87
local text = L " menu:changeUnits"
88
88
self .image = state .assets .images .changeUnits
@@ -132,8 +132,6 @@ function changeUnitsButton:render(x, y)
132
132
end
133
133
end
134
134
135
- local settingsButton = Luaoop .class (" Livesim2.MainMenu.SettingsButton" , glow .element )
136
-
137
135
function settingsButton :new (state )
138
136
local text = L " menu:settings"
139
137
self .image = state .assets .images .settingsDualGear
@@ -183,6 +181,12 @@ function settingsButton:render(x, y)
183
181
end
184
182
end
185
183
184
+ function invisibleButton :new (w , h )
185
+ self .width , self .height = w , h
186
+ end
187
+
188
+ function invisibleButton .render () end
189
+
186
190
-- End UI stuff
187
191
188
192
local function makeEnterGamestateFunction (name , noloading )
@@ -267,6 +271,10 @@ function mainMenu:load()
267
271
if not (self .data .grayGradient ) then
268
272
self .data .grayGradient = util .gradient (" vertical" , color .transparent , color .hex6A6767F0 )
269
273
end
274
+
275
+ local invbtn = invisibleButton (240 , 80 )
276
+ invbtn :addEventListener (" mousereleased" , makeEnterGamestateFunction (" systemInfo" , true ))
277
+ glow .addFixedElement (invbtn , 720 , 560 )
270
278
end
271
279
272
280
-- Title text "{ffa73d}Live {ffffff}Simulator: {ff4fae}2" is in 38x584 (text "title")
0 commit comments