From b09c7e8af48ba38d4cc56ac43f55625ecf940feb Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Wed, 17 Sep 2014 12:20:55 -0700 Subject: [PATCH] OptionsCustomizeProfile, HeartEntry improvements --- Themes/_fallback/Languages/en.ini | 1 + .../BGAnimations/ScreenHeartEntry overlay.lua | 4 +-- .../ScreenOptionsCustomizeProfile overlay.lua | 29 +++++++++---------- .../ScreenWithMenuElements header/default.lua | 3 +- Themes/default/metrics.ini | 4 +++ 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index c87a54ffbd..0abdbfa0ef 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -1619,6 +1619,7 @@ Enter a name for the profile.=Enter a name for the profile. NewProfileDefaultName=New [ScreenOptionsCustomizeProfile] +HeaderText=Edit Profile weight=Weight (lbs) voomax=VO2Max birth_year=Birth Year diff --git a/Themes/default/BGAnimations/ScreenHeartEntry overlay.lua b/Themes/default/BGAnimations/ScreenHeartEntry overlay.lua index 5229752fc3..896d70a37c 100644 --- a/Themes/default/BGAnimations/ScreenHeartEntry overlay.lua +++ b/Themes/default/BGAnimations/ScreenHeartEntry overlay.lua @@ -50,7 +50,7 @@ for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do ) .. { OnCommand=cmd(diffuse,PlayerDarkColor(pn)), FitCommand=function(self, param) - self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)}) + self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)}) end, }, LoadActor( THEME:GetPathG("_frame", "1D"), @@ -59,7 +59,7 @@ for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do ) .. { OnCommand=cmd(diffuse,PlayerColor(pn)), FitCommand=function(self, param) - self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)}) + self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)}) end, } }, diff --git a/Themes/default/BGAnimations/ScreenOptionsCustomizeProfile overlay.lua b/Themes/default/BGAnimations/ScreenOptionsCustomizeProfile overlay.lua index 3bcec8c3d0..24d02f4c43 100644 --- a/Themes/default/BGAnimations/ScreenOptionsCustomizeProfile overlay.lua +++ b/Themes/default/BGAnimations/ScreenOptionsCustomizeProfile overlay.lua @@ -9,7 +9,7 @@ local cursor_spacing_value = 30 local number_entry= new_numpad_entry{ Name= "number_entry", - InitCommand= cmd(diffusealpha, 0; xy, _screen.cx*1.5, _screen.cy), + InitCommand= cmd(diffusealpha, 0; xy, _screen.cx, _screen.cy * 1.5), value = LoadFont("Common Large") .. { InitCommand=cmd(xy,0,-62), OnCommand=cmd(zoom,0.75;diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone(PlayerColor(PLAYER_1))); @@ -102,9 +102,9 @@ local menu_items= { local menu_cursor local menu_pos= 1 -local menu_start= 72 -local menu_x= 32 -local value_x= 300 +local menu_start= SCREEN_TOP + 80 +local menu_x= SCREEN_CENTER_X * 0.25 +local value_x= ( SCREEN_CENTER_X * 0.25 ) + 256 local fader local cursor_on_menu= true local menu_item_actors= {} @@ -112,7 +112,7 @@ local menu_values= {} local function fade_actor_to(actor, alf) actor:stoptweening() - actor:linear(.2) + actor:smooth(.15) actor:diffusealpha(alf) end @@ -135,7 +135,7 @@ local function input(event) menu_values[menu_pos]:settext(item_value_to_text(item, value)) Profile[item.set](profile, value) elseif item.item_type == "number" then - fade_actor_to(fader, .8) + --fade_actor_to(fader, .8) fade_actor_to(number_entry.container, 1) number_entry.value= Profile[item.get](profile) number_entry.value_actor:playcommand("Set", {number_entry.value}) @@ -164,7 +164,7 @@ local function input(event) local item= menu_items[menu_pos] Profile[item.set](profile, number_entry.value) menu_values[menu_pos]:settext(item_value_to_text(item, number_entry.value)) - fade_actor_to(fader, 0) + --fade_actor_to(fader, 0) fade_actor_to(number_entry.container, 0) cursor_on_menu= true end @@ -201,7 +201,7 @@ local args= { ) .. { OnCommand=cmd(diffuse,PlayerDarkColor(PLAYER_1)), FitCommand=function(self, param) - self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)}) + self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)}) end, }, LoadActor( THEME:GetPathG("_frame", "1D"), @@ -210,7 +210,7 @@ local args= { ) .. { OnCommand=cmd(diffuse,PlayerColor(PLAYER_1)), FitCommand=function(self, param) - self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)}) + self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)}) end, } }, @@ -243,15 +243,14 @@ for i, item in ipairs(menu_items) do end end -args[#args+1]= Def.Quad{ +local _height = (#menu_items) * 24 +args[#args+1]= LoadActor(THEME:GetPathB("_frame", "3x3"),"rounded black",474,_height) .. { Name= "fader", InitCommand= function(self) fader= self - self:setsize(270, #menu_items * 24) - self:horizalign(left) - self:vertalign(top) - self:xy(menu_x-10, menu_start-12) + self:draworder(-20) + self:xy(menu_x + 474/2, menu_start + _height/2 - 12) self:diffuse(Color.Black) - self:diffusealpha(0) + self:diffusealpha(0.75) end } diff --git a/Themes/default/Graphics/ScreenWithMenuElements header/default.lua b/Themes/default/Graphics/ScreenWithMenuElements header/default.lua index 30b1875124..e7abdf5550 100644 --- a/Themes/default/Graphics/ScreenWithMenuElements header/default.lua +++ b/Themes/default/Graphics/ScreenWithMenuElements header/default.lua @@ -37,7 +37,8 @@ t[#t+1] = LoadFont("Common Bold") .. { t[#t+1] = Def.Quad { Name="Underline"; InitCommand=cmd(x,-SCREEN_CENTER_X+24-4;y,36;horizalign,left); - OnCommand=cmd(diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,192;fadeleft,8/192;faderight,0.5); + OnCommand=cmd(diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,192;fadeleft,8/192;faderight,0.5; + visible,string.len( Screen.String("HeaderText") ) > 0 ); }; t[#t+1] = LoadFont("Common Bold") .. { diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 28aa7b378d..bba5885d90 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -1417,6 +1417,10 @@ LineFancyUIBG="lua,ThemePrefRow('FancyUIBG')" [ScreenOptionsEditProfile] +[ScreenOptionsCustomizeProfile] +ShowHeader=true +ShowFooter=true + [ScreenReloadSongs] [ScreenPlayerOptions]