diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/profile.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/profile.lua index 92ec00ea90..58f03a76cc 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/profile.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/profile.lua @@ -862,45 +862,6 @@ for i = 2, #ms.SkillSets do r[#r + 1] = littlebits(i) end --- these maybe should be generalized and placed into scripts -mina -function easyInputStringWithParams(question, maxLength, isPassword, f, params) - SCREENMAN:AddNewScreenToTop("ScreenTextEntry") - local settings = { - Question = question, - MaxInputLength = maxLength, - Password = isPassword, - OnOK = function(answer) - f(answer, params) - end - } - SCREENMAN:GetTopScreen():Load(settings) -end - -function easyInputStringWithFunction(question, maxLength, isPassword, f) - easyInputStringWithParams( - question, - maxLength, - isPassword, - function(answer, params) - f(answer) - end, - {} - ) -end - ---Tables are passed by reference right? So the value is tablewithvalue to pass it by ref -function easyInputString(question, maxLength, isPassword, tablewithvalue) - easyInputStringWithParams( - question, - maxLength, - isPassword, - function(answer, params) - tablewithvalue.inputString = answer - end, - {} - ) -end - local user local pass local profilebuttons = diff --git a/Themes/Til Death/Scripts/12 util.lua b/Themes/Til Death/Scripts/12 util.lua new file mode 100644 index 0000000000..04322a5daf --- /dev/null +++ b/Themes/Til Death/Scripts/12 util.lua @@ -0,0 +1,37 @@ +function easyInputStringWithParams(question, maxLength, isPassword, f, params) + SCREENMAN:AddNewScreenToTop("ScreenTextEntry") + local settings = { + Question = question, + MaxInputLength = maxLength, + Password = isPassword, + OnOK = function(answer) + f(answer, params) + end + } + SCREENMAN:GetTopScreen():Load(settings) +end + +function easyInputStringWithFunction(question, maxLength, isPassword, f) + easyInputStringWithParams( + question, + maxLength, + isPassword, + function(answer, params) + f(answer) + end, + {} + ) +end + +--Tables are passed by reference right? So the value is tablewithvalue to pass it by ref +function easyInputString(question, maxLength, isPassword, tablewithvalue) + easyInputStringWithParams( + question, + maxLength, + isPassword, + function(answer, params) + tablewithvalue.inputString = answer + end, + {} + ) +end \ No newline at end of file