From 9dadaced8720ba1f65bb32dd195e3cea570c53c3 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Mon, 18 May 2009 02:58:16 +0000 Subject: [PATCH] Add colors and name fixes. --- stepmania/Themes/pump/Languages/en.ini | 8 ++-- stepmania/Themes/pump/Scripts/Colors.lua | 60 ++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 stepmania/Themes/pump/Scripts/Colors.lua diff --git a/stepmania/Themes/pump/Languages/en.ini b/stepmania/Themes/pump/Languages/en.ini index ce70c8c9fe..6d0de854ef 100644 --- a/stepmania/Themes/pump/Languages/en.ini +++ b/stepmania/Themes/pump/Languages/en.ini @@ -4,7 +4,9 @@ DownLeft=DownLeft DownRight=DownRight [CustomDifficulty] -Beginner=Novice +Novice=Novice Normal=Normal -Medium=Hard -Crazy=Crazy \ No newline at end of file +Hard=Hard +Crazy=Crazy +Freestyle=Freestyle +Nightmare=Nightmare \ No newline at end of file diff --git a/stepmania/Themes/pump/Scripts/Colors.lua b/stepmania/Themes/pump/Scripts/Colors.lua new file mode 100644 index 0000000000..20d560504a --- /dev/null +++ b/stepmania/Themes/pump/Scripts/Colors.lua @@ -0,0 +1,60 @@ + +local CustomDifficultyColors = { + Novice = color("#ff32f8"), + Normal = color("#2cff00"), + Hard = color("#fee600"), + Crazy = color("#ff2f39"), + HalfDouble = color("#33ff33"), -- greenish + Freestyle = color("#A020A0"), -- purplish + Nightmare = color("#1cd8ff"), + Edit = color("0.8,0.8,0.8,1"), -- gray +}; + +function CustomDifficultyToColor( sCustomDifficulty ) + local c = CustomDifficultyColors[sCustomDifficulty] + if c then return c end + return color("#000000"); +end + +function CustomDifficultyToDarkColor( sCustomDifficulty ) + local c = CustomDifficultyToColor(sCustomDifficulty); + return { c[1]/2, c[2]/2, c[3]/2, c[4] }; +end + +function CustomDifficultyToLightColor( sCustomDifficulty ) + local c = CustomDifficultyToColor(sCustomDifficulty); + return { scale(c[1],0,1,0.5,1), scale(c[2],0,1,0.5,1), scale(c[3],0,1,0.5,1), c[4] }; +end + +function CourseDifficutlyToColor( cd ) + local c = CourseDifficultyColors[cd] + if c then return c end + return color("#000000"); +end + + + + +-- (c) 2009 Chris Danford, Jason Felds +-- All rights reserved. +-- +-- Permission is hereby granted, free of charge, to any person obtaining a +-- copy of this software and associated documentation files (the +-- "Software"), to deal in the Software without restriction, including +-- without limitation the rights to use, copy, modify, merge, publish, +-- distribute, and/or sell copies of the Software, and to permit persons to +-- whom the Software is furnished to do so, provided that the above +-- copyright notice(s) and this permission notice appear in all copies of +-- the Software and that both the above copyright notice(s) and this +-- permission notice appear in supporting documentation. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +-- THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS +-- INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT +-- OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +-- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +-- PERFORMANCE OF THIS SOFTWARE. +