diff --git a/Themes/HelloWorld/BGAnimations/ScreenOptionsService in.lua b/Themes/HelloWorld/BGAnimations/ScreenOptionsService in.lua new file mode 100644 index 0000000000..904860a60c --- /dev/null +++ b/Themes/HelloWorld/BGAnimations/ScreenOptionsService in.lua @@ -0,0 +1,6 @@ +return Def.ActorFrame{ + Def.Quad{ + InitCommand=cmd(FullScreen;diffuse,color("#fffdf2FF")); + OnCommand=cmd(decelerate,0.75;diffusealpha,0); + }; +}; \ No newline at end of file diff --git a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu cancel.lua b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu cancel.lua new file mode 100644 index 0000000000..8c25be1f11 --- /dev/null +++ b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu cancel.lua @@ -0,0 +1,4 @@ +return Def.Quad{ + InitCommand=cmd(FullScreen;diffuse,color("#fffdf200")); + OnCommand=cmd(decelerate,1;diffusealpha,1); +}; \ No newline at end of file diff --git a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu out.lua b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu out.lua new file mode 100644 index 0000000000..fbcd53b75f --- /dev/null +++ b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu out.lua @@ -0,0 +1,6 @@ +return Def.ActorFrame{ + Def.Quad{ + InitCommand=cmd(FullScreen;diffuse,color("#fffdf200")); + OnCommand=cmd(sleep,1.125;decelerate,0.875;diffusealpha,1); + }; +} \ No newline at end of file diff --git a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu underlay.lua b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu underlay.lua index 9e177fce1d..6436218559 100644 --- a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu underlay.lua +++ b/Themes/HelloWorld/BGAnimations/ScreenTitleMenu underlay.lua @@ -54,9 +54,15 @@ return Def.ActorFrame { -- diffusealpha,1 makes the logo fade in when applied here. OnCommand=cmd(linear,0.5;diffusealpha,1;); }; - + -- Creative Commons logo, using a local file in the same directory: LoadActor( "creativecommons" )..{ InitCommand=cmd(x,SCREEN_LEFT+64;y,SCREEN_BOTTOM-48;Real); + OnCommand=cmd(addy,32;cropbottom,1;fadebottom,1;decelerate,0.8;cropbottom,0;fadebottom,0;addy,-32); + }; + -- a cheap reflection effect. + LoadActor( "creativecommons" )..{ + InitCommand=cmd(x,SCREEN_LEFT+64;y,SCREEN_BOTTOM-20;valign,0;zoomy,-0.6;rotationx,-40;diffusealpha,0.6;Real;); + OnCommand=cmd(addy,8;croptop,1;fadetop,0;decelerate,0.8;croptop,0;fadetop,1;addy,-8); }; }; \ No newline at end of file diff --git a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu background.lua b/Themes/HelloWorld/BGAnimations/ScreenWithMenuElements background.lua similarity index 90% rename from Themes/HelloWorld/BGAnimations/ScreenTitleMenu background.lua rename to Themes/HelloWorld/BGAnimations/ScreenWithMenuElements background.lua index b2bdd597f2..ee69cb6ab6 100644 --- a/Themes/HelloWorld/BGAnimations/ScreenTitleMenu background.lua +++ b/Themes/HelloWorld/BGAnimations/ScreenWithMenuElements background.lua @@ -1,5 +1,4 @@ --- this file returns a single quad that represents the background of --- ScreenTitleMenu. +-- this file returns a single quad that represents the background of most screens in the theme. return Def.Quad{ -- FullScreen is defined in Themes/_fallback/Scripts/02 Actor.lua in sm-ssc. diff --git a/Themes/HelloWorld/BGAnimations/_wait.lua b/Themes/HelloWorld/BGAnimations/_wait.lua new file mode 100644 index 0000000000..1c59852cfd --- /dev/null +++ b/Themes/HelloWorld/BGAnimations/_wait.lua @@ -0,0 +1,4 @@ +local time = ... +if not time then time = 1.0 end + +return Def.Actor{ OnCommand=cmd(sleep,time); }; \ No newline at end of file diff --git a/Themes/HelloWorld/Graphics/ScreenTitleMenu scroll.lua b/Themes/HelloWorld/Graphics/ScreenTitleMenu scroll.lua index 72e63f3bc7..0445f29634 100644 --- a/Themes/HelloWorld/Graphics/ScreenTitleMenu scroll.lua +++ b/Themes/HelloWorld/Graphics/ScreenTitleMenu scroll.lua @@ -13,17 +13,22 @@ Concepts used: * accelerate --]] +-- this is used as a shorthand for GameCommand. +local gc = Var("GameCommand") + local t = Def.ActorFrame{ LoadFont( "_frutiger roman" ) ..{ -- This line tries to find a corresponding line in the current language -- ini file; If it doesn't, (and you haven't disabled error messages,) -- then an error will pop up telling you where you need to add the -- string. - Text=THEME:GetString( 'ScreenTitleMenu', Var("GameCommand"):GetText() ); + Text=THEME:GetString( 'ScreenTitleMenu', gc:GetText() ); InitCommand=cmd(zoom,0.85;y,-1;shadowlength,0;diffuse,color("#000000");halign,1;strokecolor,color("0,0,0,0");); DisabledCommand=cmd( diffuse,color("0.45,0,0,1") ); GainFocusCommand=cmd(stoptweening;accelerate,0.15;diffuse,color("#000000");strokecolor,color("0.85,0.9,1,0.75");); LoseFocusCommand=cmd(stoptweening;accelerate,0.2;diffuse,color("#888888");strokecolor,color("0,0,0,0");); + OffFocusedCommand=cmd(sleep,1;decelerate,1;addx,-32;diffuse,color("#FF0000")); + OffUnfocusedCommand=cmd(sleep,0.2*gc:GetIndex();linear,0.5;addx,SCREEN_CENTER_X;); }; }; diff --git a/Themes/HelloWorld/Languages/en.ini b/Themes/HelloWorld/Languages/en.ini index 361db82e0d..3fea1a2d15 100644 --- a/Themes/HelloWorld/Languages/en.ini +++ b/Themes/HelloWorld/Languages/en.ini @@ -2,5 +2,6 @@ WindowTitle=Hello World (and other sm-ssc theming examples) [ScreenTitleMenu] -Game Start=Enter Guide +Guide=Guide +Reference=Reference Tutorial=Tutorial Series \ No newline at end of file diff --git a/Themes/HelloWorld/ThemeInfo.ini b/Themes/HelloWorld/ThemeInfo.ini index d716420a59..0948fe30e1 100644 --- a/Themes/HelloWorld/ThemeInfo.ini +++ b/Themes/HelloWorld/ThemeInfo.ini @@ -1,6 +1,6 @@ # [en] ThemeInfo is used to set the theme's name (as it appears in the options # menu), as well as the author (which shows up on ScreenInit, assuming you use it -# in your them). +# in your theme). [ThemeInfo] DisplayName=Hello World -Author=SSC \ No newline at end of file +Author=Various Contributors \ No newline at end of file diff --git a/Themes/HelloWorld/metrics.ini b/Themes/HelloWorld/metrics.ini index 5709f3ab3e..9746eeed3e 100644 --- a/Themes/HelloWorld/metrics.ini +++ b/Themes/HelloWorld/metrics.ini @@ -14,46 +14,106 @@ InitialScreen="ScreenTitleMenu" ################################################################################ # [core] Core Screens; these are the concrete implementations. + +# ScreenTitleMenu is the first screen you see in this theme, thanks to the +# [Common] InitialScreen metric being changed. [ScreenTitleMenu] +# PrevScreen is set to make sure nothing gets messed up. PrevScreen="ScreenTitleMenu" # These settings are used to disable the attract sequence: IdleTimeoutSeconds=-1 IdleTimeoutScreen="ScreenTitleMenu" -# These settings define what options appear on the menu: +# These settings define what options appear on the menu and what commands are +# run when they are selected: ChoiceNames="1,2,3,4,5" -Choice1="text,Guide" -Choice2="text,Reference" -Choice3="text,Tutorial" -Choice4="screen,ScreenOptionsService;text,Options" -Choice5="screen,ScreenExit;text,Exit" +Choice1="text,Guide;screen,ScreenGuideMain" +Choice2="text,Reference;" +Choice3="text,Tutorial;" +Choice4="text,Options;screen,ScreenOptionsService;" +Choice5="text,Exit;screen,ScreenExit;" # These control the placement of the items, as well as the list: ScrollerX=SCREEN_RIGHT-44 ScrollerY=SCREEN_CENTER_Y+32 +ScrollerOnCommand=addx,SCREEN_CENTER_X;decelerate,0.8;addx,-SCREEN_CENTER_X ScrollerTransform=function(self,offset,itemIndex,numItems) self:y(27*offset) end +[ScreenOptionsService] +# dummying out ScreenInit +NextScreen="ScreenTitleMenu" +PrevScreen="ScreenTitleMenu" ################################################################################ -# [guide] The guide splits the elements of StepMania theming into different sections. # +# [guide] The guide splits the elements of StepMania theming into different sections. +# It acts as an introduction to all of the concepts in modern StepMania theming. # All guide pages aside from ScreenGuideMain MUST be prefixed with "Guide" in # order to differentiate them from the core screens. [ScreenGuideMain] +Class="ScreenSelectMaster" +Fallback="ScreenSelectMaster" +PrevScreen="ScreenTitleMenu" + +ChoiceNames="Metrics,Fonts,Graphics,BGAnims,Sounds,Scripts,Other,NoteSkins,Announcers" +ChoiceMetrics="" +ChoiceFonts="" +ChoiceGraphics="" +ChoiceBGAnims="" +ChoiceSounds="" +ChoiceScripts="" +ChoiceOther="" +ChoiceNoteSkins="" +ChoiceAnnouncers="" +DefaultChoice="Metrics" + +# guide base screen (sets up things I don't want to retype a lot -aj) # +[GuideBase] +Class="ScreenSelectMaster" +Fallback="ScreenSelectMaster" ## Metrics +[GuideMetrics] +Fallback="GuideBase" ## Fonts +[GuideFonts] +Fallback="GuideBase" ## Graphics +[GuideGraphics] +Fallback="GuideBase" ## BGAnimations +[GuideBGA] +Fallback="GuideBase" ### Decorations (simpler) ### Overlay/Underlay (can be more complex) ## Sounds +[GuideSounds] +Fallback="GuideBase" ## Scripts +[GuideScripts] +Fallback="GuideBase" ## the Other folder +[GuideOther] +Fallback="GuideBase" +### HowToPlay steps +### PreferredSort + +# And then there are the things that are related to theming: +## NoteSkins +[GuideNoteSkins] +Fallback="GuideBase" + +## Announcers +[GuideAnnouncers] +Fallback="GuideBase" + +## Characters +[GuideCharacters] +Fallback="GuideBase" ################################################################################ # [ref] The reference section contains a complete listing of commands and examples of how they work. # @@ -61,12 +121,98 @@ ScrollerTransform=function(self,offset,itemIndex,numItems) self:y(27*offset) end # in order to differentiate them from the core screens. [ScreenReferenceMain] +# reference base screen (sets up things I don't want to retype a lot -aj) # +[ReferenceBase] +Class="ScreenSelectMaster" +Fallback="ScreenSelectMaster" + ## Screens +[ReferenceScreens] +Fallback="ReferenceBase" + +## Managers and other Singletons +[ReferenceManagers] +Fallback="ReferenceBase" + +# STEPMANIA ROBOT MASTERS +### ANNOUNCER [man] +[ReferenceAnnouncerMan] + +### CHARMAN +[ReferenceCharMan] + +### FILEMAN +[ReferenceFileMan] + +### GAMEMAN +[ReferenceGameMan] + +### GAMESOUNDMAN +[ReferenceGameSoundMan] + +### GAMESTATE +[ReferenceGameState] + +### MEMCARDMAN +[ReferenceMemCardMan] + +### MESSAGEMAN +[ReferenceMessageMan] + +### NOTESKIN [man] +[ReferenceNoteskinMan] + +### PREFSMAN +[ReferencePrefsMan] + +### PROFILEMAN +[ReferenceProfileMan] + +### SCREENMAN +[ReferenceScreenMan] + +### SONGMAN +[ReferenceSongMan] + +### STATSMAN +[ReferenceStatsMan] + +### THEME [man] +[ReferenceThemeMan] + +### UNLOCKMAN +[ReferenceUnlockMan] ## Classes +[ReferenceClasses] +Fallback="ReferenceBase" -## Etc. +### Actor +[ReferenceActor] +#### many sub-things + +### ActorFrame +[ReferenceActorFrame] + +### Banner +[ReferenceBanner] + +### Song +[ReferenceSong] + +### Steps +[ReferenceSteps] + +### Course +[ReferenceCourse] + +### Trail +[ReferenceTrail] + +### and a ton of missing stuff ################################################################################ # [tutor] Tutorials are guides to implementing specific things # -[ScreenTutorialMain] \ No newline at end of file +[ScreenTutorialMain] + +# todo: figure out what tutorials \ No newline at end of file diff --git a/Themes/HelloWorld/readme.txt b/Themes/HelloWorld/readme.txt index d14beaae4e..c72d71d7b8 100644 --- a/Themes/HelloWorld/readme.txt +++ b/Themes/HelloWorld/readme.txt @@ -1,6 +1,8 @@ -Hello World (and other sm-ssc theming examples) +Hello World +and other sm-ssc theming examples +-------------------------------------- A theme by various contributors. ------------------------------------------------ +-------------------------------------- This theme and its accompanying documentation are licensed under the Creative Commons Attribution-Share Alike 3.0 license. @@ -12,6 +14,22 @@ http://creativecommons.org/licenses/by-sa/3.0/us/ Table of Contents Introduction [intro] Chapter List [chapt] + Guide [guide] + Metrics [g_met] + Fonts [g_fon] + Graphics [g_gfx] + BGAnims [g_bga] + Sounds [g_sfx] + Scripts [g_scr] + Other [g_oth] + NoteSkins [g_not] + Announcers [g_ann] + Characters [g_cha] + Reference [ref] + Screens [r_scr] + Managers [r_man] + Classes [r_cls] + Tutorials [tutor] [others tba] ================================================================================ @@ -22,4 +40,10 @@ This theme and accompanying documentation are provided for people new to theming for StepMania, using sm-ssc as a base. ================================================================================ -The Chapters [chapt] \ No newline at end of file +The Chapters [chapt] + +The theme itself is split into three sections, encompassing various elements of +sm-ssc theming. + +The Guide is a general run-through of how Themes are constructed (along with +NoteSkins, Announcers, and Characters) \ No newline at end of file