OptionsCustomizeProfile, HeartEntry improvements

This commit is contained in:
Jonathan Payne
2014-09-17 12:20:55 -07:00
parent 426148ebdd
commit b09c7e8af4
5 changed files with 23 additions and 18 deletions
+1
View File
@@ -1619,6 +1619,7 @@ Enter a name for the profile.=Enter a name for the profile.
NewProfileDefaultName=New NewProfileDefaultName=New
[ScreenOptionsCustomizeProfile] [ScreenOptionsCustomizeProfile]
HeaderText=Edit Profile
weight=Weight (lbs) weight=Weight (lbs)
voomax=VO2Max voomax=VO2Max
birth_year=Birth Year birth_year=Birth Year
@@ -50,7 +50,7 @@ for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
) .. { ) .. {
OnCommand=cmd(diffuse,PlayerDarkColor(pn)), OnCommand=cmd(diffuse,PlayerDarkColor(pn)),
FitCommand=function(self, param) 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, end,
}, },
LoadActor( THEME:GetPathG("_frame", "1D"), LoadActor( THEME:GetPathG("_frame", "1D"),
@@ -59,7 +59,7 @@ for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
) .. { ) .. {
OnCommand=cmd(diffuse,PlayerColor(pn)), OnCommand=cmd(diffuse,PlayerColor(pn)),
FitCommand=function(self, param) 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, end,
} }
}, },
@@ -9,7 +9,7 @@ local cursor_spacing_value = 30
local number_entry= new_numpad_entry{ local number_entry= new_numpad_entry{
Name= "number_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") .. { value = LoadFont("Common Large") .. {
InitCommand=cmd(xy,0,-62), InitCommand=cmd(xy,0,-62),
OnCommand=cmd(zoom,0.75;diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone(PlayerColor(PLAYER_1))); 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_cursor
local menu_pos= 1 local menu_pos= 1
local menu_start= 72 local menu_start= SCREEN_TOP + 80
local menu_x= 32 local menu_x= SCREEN_CENTER_X * 0.25
local value_x= 300 local value_x= ( SCREEN_CENTER_X * 0.25 ) + 256
local fader local fader
local cursor_on_menu= true local cursor_on_menu= true
local menu_item_actors= {} local menu_item_actors= {}
@@ -112,7 +112,7 @@ local menu_values= {}
local function fade_actor_to(actor, alf) local function fade_actor_to(actor, alf)
actor:stoptweening() actor:stoptweening()
actor:linear(.2) actor:smooth(.15)
actor:diffusealpha(alf) actor:diffusealpha(alf)
end end
@@ -135,7 +135,7 @@ local function input(event)
menu_values[menu_pos]:settext(item_value_to_text(item, value)) menu_values[menu_pos]:settext(item_value_to_text(item, value))
Profile[item.set](profile, value) Profile[item.set](profile, value)
elseif item.item_type == "number" then elseif item.item_type == "number" then
fade_actor_to(fader, .8) --fade_actor_to(fader, .8)
fade_actor_to(number_entry.container, 1) fade_actor_to(number_entry.container, 1)
number_entry.value= Profile[item.get](profile) number_entry.value= Profile[item.get](profile)
number_entry.value_actor:playcommand("Set", {number_entry.value}) number_entry.value_actor:playcommand("Set", {number_entry.value})
@@ -164,7 +164,7 @@ local function input(event)
local item= menu_items[menu_pos] local item= menu_items[menu_pos]
Profile[item.set](profile, number_entry.value) Profile[item.set](profile, number_entry.value)
menu_values[menu_pos]:settext(item_value_to_text(item, 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) fade_actor_to(number_entry.container, 0)
cursor_on_menu= true cursor_on_menu= true
end end
@@ -201,7 +201,7 @@ local args= {
) .. { ) .. {
OnCommand=cmd(diffuse,PlayerDarkColor(PLAYER_1)), OnCommand=cmd(diffuse,PlayerDarkColor(PLAYER_1)),
FitCommand=function(self, param) 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, end,
}, },
LoadActor( THEME:GetPathG("_frame", "1D"), LoadActor( THEME:GetPathG("_frame", "1D"),
@@ -210,7 +210,7 @@ local args= {
) .. { ) .. {
OnCommand=cmd(diffuse,PlayerColor(PLAYER_1)), OnCommand=cmd(diffuse,PlayerColor(PLAYER_1)),
FitCommand=function(self, param) 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, end,
} }
}, },
@@ -243,15 +243,14 @@ for i, item in ipairs(menu_items) do
end end
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) Name= "fader", InitCommand= function(self)
fader= self fader= self
self:setsize(270, #menu_items * 24) self:draworder(-20)
self:horizalign(left) self:xy(menu_x + 474/2, menu_start + _height/2 - 12)
self:vertalign(top)
self:xy(menu_x-10, menu_start-12)
self:diffuse(Color.Black) self:diffuse(Color.Black)
self:diffusealpha(0) self:diffusealpha(0.75)
end end
} }
@@ -37,7 +37,8 @@ t[#t+1] = LoadFont("Common Bold") .. {
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
Name="Underline"; Name="Underline";
InitCommand=cmd(x,-SCREEN_CENTER_X+24-4;y,36;horizalign,left); 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") .. { t[#t+1] = LoadFont("Common Bold") .. {
+4
View File
@@ -1417,6 +1417,10 @@ LineFancyUIBG="lua,ThemePrefRow('FancyUIBG')"
[ScreenOptionsEditProfile] [ScreenOptionsEditProfile]
[ScreenOptionsCustomizeProfile]
ShowHeader=true
ShowFooter=true
[ScreenReloadSongs] [ScreenReloadSongs]
[ScreenPlayerOptions] [ScreenPlayerOptions]