Advertisement
Jousway

PaneDisplay p1.lua

Sep 28th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.67 KB | None | 0 0
  1. --still a hackjob!
  2. --I really cant lua like the SSC :<
  3.  
  4. local t = Def.ActorFrame { 
  5.     Def.ActorFrame{
  6.         Name="Container";
  7.         LoadFont("Common Normal") .. {
  8.             Text="Taps\nJumps\nHolds\nMines\n";
  9.             InitCommand=cmd(horizalign,left;x,-150;diffuse,color("1,1,1,1.8"));
  10.         };
  11.         LoadFont("Common Normal") .. {
  12.             Name="Values1";
  13.             InitCommand=cmd(horizalign,left;x,-50;diffuse,color("1,1,1,1.8"));
  14.         };
  15.         LoadFont("Common Normal") .. {
  16.             Text="Hands\nRolls\nLifts\nFakes\n";
  17.             InitCommand=cmd(horizalign,left;x,50;diffuse,color("1,1,1,1.8"));
  18.         };
  19.         LoadFont("Common Normal") .. {
  20.             Name="Values2";
  21.             InitCommand=cmd(horizalign,left;x,150;diffuse,color("1,1,1,1.8"));
  22.         };
  23.     };
  24. };
  25.  
  26. local function Update(self)
  27.     local song = GAMESTATE:GetCurrentSong();
  28.  
  29.     local function Radar(pn,cat)
  30.         local GetRadar = GAMESTATE:GetCurrentSteps(pn):GetRadarValues(pn);
  31.         return GetRadar:GetValue(cat);
  32.     end;
  33.    
  34.     Con = self:GetChild("Container");
  35.     Values1 = self:GetChild("Container"):GetChild("Values1");
  36.     Values2 = self:GetChild("Container"):GetChild("Values2");
  37.     if song then
  38.         if GAMESTATE:GetCurrentSteps(PLAYER_1) then
  39.             Con:visible(true);
  40.             Values1:settext(Radar(PLAYER_1,'RadarCategory_TapsAndHolds').."\n"..Radar(PLAYER_1,'RadarCategory_Jumps').."\n"..Radar(PLAYER_1,'RadarCategory_Holds').."\n"..Radar(PLAYER_1,'RadarCategory_Mines').."\n");
  41.             Values2:settext(Radar(PLAYER_1,'RadarCategory_Hands').."\n"..Radar(PLAYER_1,'RadarCategory_Rolls').."\n"..Radar(PLAYER_1,'RadarCategory_Lifts').."\n"..Radar(PLAYER_1,'RadarCategory_Fakes').."\n");
  42.         else
  43.             Con:visible(false);
  44.         end;
  45.     else
  46.         Con:visible(false);
  47.     end;
  48. end;
  49.  
  50. t.InitCommand=cmd(SetUpdateFunction,Update);
  51. return t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement