Skip to content

Commit

Permalink
Merge pull request #330 from Jolomann/color
Browse files Browse the repository at this point in the history
Made title menu elements color configurable
  • Loading branch information
nico-abram authored Oct 25, 2018
2 parents 4ef582b + 44ebbe7 commit 414705f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
33 changes: 23 additions & 10 deletions Themes/Til Death/BGAnimations/ScreenTitleMenu underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,57 @@ local frameY = THEME:GetMetric("ScreenTitleMenu", "ScrollerY")
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(0, 0):halign(0):valign(0):zoomto(250, 900):diffuse(color("#161515")):diffusealpha(1)
self:xy(0, 0):halign(0):valign(0):zoomto(250, 900):diffuse(getTitleColor('BG_Left')):diffusealpha(1)
end
}

--Right gray rectangle
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(250, 0):halign(0):valign(0):zoomto(1000, 900):diffuse(color("#222222")):diffusealpha(1)
self:xy(250, 0):halign(0):valign(0):zoomto(1000, 900):diffuse(getTitleColor('BG_Right')):diffusealpha(1)
end
}

--Light purple line
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(250, 0):halign(0):valign(0):zoomto(10, 900):diffuse(color("#b87cf0")):diffusealpha(1)
self:xy(250, 0):halign(0):valign(0):zoomto(10, 900):diffuse(getTitleColor('Line_Left')):diffusealpha(1)
end
}

--Dark purple line
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(260, 0):halign(0):valign(0):zoomto(10, 900):diffuse(color("#59307f")):diffusealpha(1)
self:xy(260, 0):halign(0):valign(0):zoomto(10, 900):diffuse(getTitleColor('Line_Right')):diffusealpha(1)
end
}

--Title text
t[#t + 1] =
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(42, frameY - 62):zoom(0.65):valign(1):halign(0):diffuse(color("#b87cf0"))
end,
OnCommand = function(self)
self:settext(getThemeName())
InitCommand=function(self)
self:xy(75,frameY-82):zoom(0.65):valign(1):halign(0):diffuse(getMainColor('positive'))
end
}
OnCommand=function(self)
self:settext("Etterna")
end
}

--Theme text
t[#t + 1] =
LoadFont("Common Normal") ..
{
InitCommand=function(self)
self:xy(95,frameY-52):zoom(0.65):valign(1):halign(0):diffuse(getMainColor('positive'))
end
OnCommand=function(self)
self:settext(getThemeName())
end
}

-- lazy game update button -mina
local gameneedsupdating = false
Expand Down
2 changes: 1 addition & 1 deletion Themes/Til Death/Graphics/ScreenTitleMenu scroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ return Def.ActorFrame {
self:xy(280, -78):halign(0):valign(0)
end,
GainFocusCommand = function(self)
self:zoom(0.57):diffuse(color("#59307f"))
self:zoom(0.57):diffuse(getMainColor('positive'))
end,
LoseFocusCommand = function(self)
self:zoom(0.55):diffuse(color("#b87cf0"))
Expand Down
10 changes: 10 additions & 0 deletions Themes/Til Death/Scripts/01 color_config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
local defaultConfig = {
title = {
BG_Left = "#161515",
BG_Right = "#222222",
Line_Left = "#b87cf0",
Line_Right = "#59307f"
},
main = {
highlight = "#614080",
frames = "#000111",
Expand Down Expand Up @@ -137,6 +143,10 @@ function getVividDifficultyColor(diff)
return color(colorConfig:get_data().difficultyVivid[diff]) or color("#ffffff")
end

function getTitleColor(type)
return color(colorConfig:get_data().title[type])
end

-- expecting ms input (153, 13.321, etc) so convert to seconds to compare to judgment windows -mina
function offsetToJudgeColor(offset, scale)
local offset = math.abs(offset / 1000)
Expand Down

0 comments on commit 414705f

Please sign in to comment.