Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --HEHU I CANT LUA - Jousway
- text,word = "SM:\\> ","";
- output = "Stepmania Console 1.0 - Use DIR for Screens"
- nobut = 0;
- function input(event)
- if event.type == "InputEventType_Release" then
- nobut = 1;
- return;
- end;
- if nobut == 1 then
- word = ToEnumShortString(event.DeviceInput.button);
- if string.match(text, "SM... .+") ~= nil then
- cm,st = string.match(text, "(SM... )(.+)");
- end;
- if word == "backspace" then
- if text ~= "SM:\\> " then
- text = string.match(text, "(.+).");
- end;
- elseif word == "space" then
- text = text.." ";
- elseif word == "enter" then
- if st == "dir" then
- output = output.."\nScreenSelectMusic ScreenOptionsService ScreenExit"
- elseif st == "screenselectmusic" then
- ts:SetNextScreenName("ScreenSelectMusic");
- ts:StartTransitioningScreen("SM_GoToNextScreen");
- elseif st == "screenoptionsservice" then
- ts:SetNextScreenName("ScreenOptionsService");
- ts:StartTransitioningScreen("SM_GoToNextScreen");
- elseif st == "screenexit" then
- output = "Exiting Game";
- text = "";
- ts:SetNextScreenName("ScreenExit");
- ts:StartTransitioningScreen("SM_GoToNextScreen");
- elseif st == "cls" then
- output = "";
- elseif st == "help" then
- output = "Stepmania Console 1.0 - Use DIR for Screens";
- else
- output = output.."\nERROR: Screen Not Found"
- end;
- text = cm;
- elseif string.match(word, "..") == nil then
- text = text..word;
- end;
- CONSOLEI:settext(text);
- CONSOLEO:settext(output);
- nlin = 1;
- for l in string.gmatch(output, "\n") do
- nlin = nlin+1;
- end;
- CONSOLEO:y(SCREEN_BOTTOM-60-(16.5*nlin));
- nobut = 0;
- end;
- end;
- return Def.ActorFrame {
- Def.BitmapText{ Name="CONSOLEI", Font= "Common Normal", InitCommand=cmd(xy,5,SCREEN_BOTTOM-50;halign,0), Text=text},
- Def.BitmapText{ Name="CONSOLEO", Font= "Common Normal", InitCommand=cmd(xy,5,SCREEN_BOTTOM-50-26.5;halign,0), Text=output};
- OnCommand = function(self)
- CONSOLEO = self:GetChild("CONSOLEO");
- CONSOLEI = self:GetChild("CONSOLEI");
- ts = SCREENMAN:GetTopScreen();
- ts:AddInputCallback(input);
- end;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement