Skip to content

Commit 6be20f6

Browse files
committed
TitleMenu improvements
1 parent 29b5bfd commit 6be20f6

File tree

1 file changed

+54
-29
lines changed

1 file changed

+54
-29
lines changed

Themes/Til Death/BGAnimations/ScreenTitleMenu underlay.lua

+54-29
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ t[#t + 1] =
6060
LoadFont("Common Large") ..
6161
{
6262
InitCommand=function(self)
63-
self:xy(75,frameY-82):zoom(0.65):valign(1):halign(0):diffuse(getMainColor('positive'))
63+
self:xy(125,frameY-82):zoom(0.7):align(0.5,1)
64+
self:diffusetopedge(Saturation(getMainColor("highlight"), 0.5))
65+
self:diffusebottomedge(Saturation(getMainColor("positive"), 0.8))
6466
end,
6567
OnCommand=function(self)
6668
self:settext("Etterna")
@@ -69,55 +71,78 @@ t[#t + 1] =
6971

7072
--Theme text
7173
t[#t + 1] =
72-
LoadFont("Common Normal") ..
74+
LoadFont("Common Large") ..
7375
{
7476
InitCommand=function(self)
75-
self:xy(95,frameY-52):zoom(0.65):valign(1):halign(0):diffuse(getMainColor('positive'))
77+
self:xy(125,frameY-52):zoom(0.325):align(0.5,1)
78+
self:diffusetopedge(Saturation(getMainColor("highlight"), 0.5))
79+
self:diffusebottomedge(Saturation(getMainColor("positive"), 0.8))
7680
end,
7781
OnCommand=function(self)
78-
self:settext(getThemeName())
82+
self:settext(getThemeName())
7983
end
8084
}
8185

82-
-- lazy game update button -mina
83-
local gameneedsupdating = false
84-
local buttons = {x = 122, y = 40, width = 140, height = 36, fontScale = 0.3, color = getMainColor("frames")}
86+
--Version number
8587
t[#t + 1] =
86-
Def.Quad {
87-
InitCommand = function(self)
88-
self:xy(buttons.x, buttons.y):zoomto(buttons.width, buttons.height):halign(1):valign(0):diffuse(buttons.color):diffusealpha(
89-
0
90-
)
91-
local latest = tonumber((DLMAN:GetLastVersion():gsub("[.]", "", 1)))
92-
local current = tonumber((GAMESTATE:GetEtternaVersion():gsub("[.]", "", 1)))
93-
if latest and latest > current then
94-
gameneedsupdating = true
95-
end
96-
end,
97-
OnCommand = function(self)
98-
if gameneedsupdating then
99-
self:diffusealpha(1)
88+
LoadFont("Common Large") ..
89+
{
90+
Name = "Version",
91+
InitCommand=function(self)
92+
self:xy(125,frameY-35):zoom(0.25):align(0.5,1)
93+
self:diffusetopedge(Saturation(getMainColor("highlight"), 0.5))
94+
self:diffusebottomedge(Saturation(getMainColor("positive"), 0.8))
95+
end,
96+
BeginCommand = function(self)
97+
self:settext(GAMESTATE:GetEtternaVersion())
98+
end,
99+
MouseLeftClickMessageCommand=function(self)
100+
local tag = "urlnoexit,https://github.com/etternagame/etterna/releases/tag/v" .. GAMESTATE:GetEtternaVersion()
101+
if isOver(self) then
102+
GAMESTATE:ApplyGameCommand(tag)
103+
end
100104
end
105+
}
106+
107+
--game update button
108+
local gameneedsupdating = false
109+
local buttons = {x = 20, y = 20, width = 142, height = 42, fontScale = 0.35, color = getMainColor("frames")}
110+
t[#t + 1] = Def.ActorFrame {
111+
InitCommand = function(self)
112+
self:xy(buttons.x,buttons.y)
101113
end,
102-
MouseLeftClickMessageCommand = function(self)
103-
if isOver(self) and gameneedsupdating then
104-
GAMESTATE:ApplyGameCommand("urlnoexit,https://github.com/etternagame/etterna/releases;text,GitHub")
114+
Def.Quad {
115+
InitCommand = function(self)
116+
self:zoomto(buttons.width, buttons.height):halign(0):valign(0):diffuse(buttons.color):diffusealpha(0)
117+
local latest = tonumber((DLMAN:GetLastVersion():gsub("[.]", "", 1)))
118+
local current = tonumber((GAMESTATE:GetEtternaVersion():gsub("[.]", "", 1)))
119+
if latest and latest > current then
120+
gameneedsupdating = true
121+
end
122+
end,
123+
OnCommand = function(self)
124+
if gameneedsupdating then
125+
self:diffusealpha(0.3)
126+
end
127+
end,
128+
MouseLeftClickMessageCommand = function(self)
129+
if isOver(self) and gameneedsupdating then
130+
GAMESTATE:ApplyGameCommand("urlnoexit,https://github.com/etternagame/etterna/releases;text,GitHub")
131+
end
105132
end
106-
end
107-
}
108-
109-
t[#t + 1] =
133+
},
110134
LoadFont("Common Large") ..
111135
{
112136
OnCommand = function(self)
113-
self:xy(buttons.x + 3, buttons.y + 14):halign(1):zoom(buttons.fontScale):diffuse(getMainColor("positive"))
137+
self:xy(1.7, 1):align(0,0):zoom(buttons.fontScale):diffuse(getMainColor("positive"))
114138
if gameneedsupdating then
115139
self:settext(THEME:GetString("ScreenTitleMenu", "UpdateAvailable"))
116140
else
117141
self:settext("")
118142
end
119143
end
120144
}
145+
}
121146

122147
function mysplit(inputstr, sep)
123148
if sep == nil then

0 commit comments

Comments
 (0)