@@ -60,7 +60,9 @@ t[#t + 1] =
60
60
LoadFont (" Common Large" ) ..
61
61
{
62
62
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 ))
64
66
end ,
65
67
OnCommand = function (self )
66
68
self :settext (" Etterna" )
@@ -69,55 +71,78 @@ t[#t + 1] =
69
71
70
72
-- Theme text
71
73
t [# t + 1 ] =
72
- LoadFont (" Common Normal " ) ..
74
+ LoadFont (" Common Large " ) ..
73
75
{
74
76
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 ))
76
80
end ,
77
81
OnCommand = function (self )
78
- self :settext (getThemeName ())
82
+ self :settext (getThemeName ())
79
83
end
80
84
}
81
85
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
85
87
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
100
104
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 )
101
113
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
105
132
end
106
- end
107
- }
108
-
109
- t [# t + 1 ] =
133
+ },
110
134
LoadFont (" Common Large" ) ..
111
135
{
112
136
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" ))
114
138
if gameneedsupdating then
115
139
self :settext (THEME :GetString (" ScreenTitleMenu" , " UpdateAvailable" ))
116
140
else
117
141
self :settext (" " )
118
142
end
119
143
end
120
144
}
145
+ }
121
146
122
147
function mysplit (inputstr , sep )
123
148
if sep == nil then
0 commit comments