Quantcast

new fun stuff

Steven Jackson [04-06-15 - 12:36]
new fun stuff
Filename
SVUI_!Core/system/core.lua
SVUI_!Core/system/credits.lua
SVUI_!Core/xml/widgets.xml
diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua
index 5a837bf..cdcc5b5 100644
--- a/SVUI_!Core/system/core.lua
+++ b/SVUI_!Core/system/core.lua
@@ -873,7 +873,7 @@ function SV:Initialize()

     collectgarbage("collect");

-    self.Timers:ExecuteTimer(self.RollCredits, 5)
+    self.Timers:ExecuteTimer(self.RollCredits, 10)
 end
 --[[
 ##########################################################
diff --git a/SVUI_!Core/system/credits.lua b/SVUI_!Core/system/credits.lua
index d60a515..052271f 100644
--- a/SVUI_!Core/system/credits.lua
+++ b/SVUI_!Core/system/credits.lua
@@ -53,6 +53,7 @@ The Wowinterface Community
 local CreditFrame = _G["SVUI_CreditFrame"];
 local CreditTitle = _G["SVUI_CreditFrameTitle"];
 local CreditList = _G["SVUI_CreditFrameList"];
+local playerName = UnitName("player");

 SV.Credits = {};

@@ -95,36 +96,40 @@ SV.Credits["community"] = {
 };

 local ShowNextCredit, CreditFrame_OnUpdate;
-local ROLLED_CREDITS = 0;
+local ROLLED_CREDITS = 1;
 local CREDITS_DATA = {
   {"Produced By: ", "council"},
   {"Sponsored In Part By: ", "investors"},
   {"Contributions Provided By: ", "contributors"},
   {"Community Support From: ", "community"},
-  {"Written By: ", "author"},
+  {"Written and Directed By: ", "author"},
+  {"Starring: ", playerName},
 };

 function ShowNextCredit()
-  if(ROLLED_CREDITS <= #CREDITS_DATA) then
+  if(ROLLED_CREDITS <= 6) then
     local credit = CREDITS_DATA[ROLLED_CREDITS]
     local list = SV.Credits[credit[2]];
-    local name = list[random(1, #list)];
+    local name = list and list[random(1, #list)] or credit[2];
     CreditTitle:SetText(credit[1]);
     CreditList:SetText(name);
-    CreditFrame:FadeIn();
+    CreditFrame:FadeIn(1);
     ROLLED_CREDITS = ROLLED_CREDITS + 1;
-    self:SetScript("OnUpdate", CreditFrame_OnUpdate)
+    CreditFrame:SetScript("OnUpdate", CreditFrame_OnUpdate)
   else
-    ROLLED_CREDITS = 0;
+    ROLLED_CREDITS = 1;
     CreditFrame:Hide();
   end
 end

+local DELAY = 0;
 function CreditFrame_OnUpdate(self, elapsed)
-  if(elapsed < 5) then return end
-  if(elapsed <= 5.5) then
-    CreditFrame:FadeOut();
-  elseif(elapsed <= 10) then
+  DELAY = DELAY + elapsed
+  if(DELAY < 3) then return end
+  if(DELAY <= 3.5) then
+    CreditFrame:FadeOut(1);
+  elseif(DELAY >= 7) then
+    DELAY = 0
     self:SetScript("OnUpdate", nil)
     ShowNextCredit()
   end
@@ -140,7 +145,7 @@ function SV:PrintCredits()
 end

 function SV:RollCredits()
-  ROLLED_CREDITS = 0;
+  ROLLED_CREDITS = 1;
   CreditFrame:SetAlpha(0);
   CreditFrame:Show();
   ShowNextCredit();
diff --git a/SVUI_!Core/xml/widgets.xml b/SVUI_!Core/xml/widgets.xml
index 0cfee48..2bebae3 100644
--- a/SVUI_!Core/xml/widgets.xml
+++ b/SVUI_!Core/xml/widgets.xml
@@ -1,21 +1,26 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/">

     <Frame name="SVUI_CreditFrame" frameStrata="DIALOG" hidden="true">
-      <Size x="400" y="75"/>
+        <Size x="40" y="40"/>
+        <Anchors>
+            <Anchor point="RIGHT" x="-100" y="-100" />
+        </Anchors>
         <Layers>
             <Layer level="ARTWORK">
-              <FontString name="$parentTitle" inherits="GameFontNormal">
-                <Size x="400" y="75"/>
-                  <Anchors>
-                      <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0" />
-                  </Anchors>
-              </FontString>
-              <FontString name="$parentList" font="GameFontNormalCenter">
-                <Size x="400" y="75"/>
+
+              <FontString name="$parentList" font="SystemFont_Shadow_Outline_Huge2">
+                <Color r="1" g="1" b="1" a="0.85"/>
                 <Anchors>
-                    <Anchor point="TOPLEFT" relativeTo="$parentTitle" relativePoint="BOTTOMLEFT" x="0" y="-6" />
+                    <Anchor point="RIGHT" x="0" y="0" />
                 </Anchors>
               </FontString>
+
+              <FontString name="$parentTitle" inherits="SystemFont_Shadow_Large">
+                <Color r="1" g="1" b="1" a="0.85"/>
+                  <Anchors>
+                      <Anchor point="BOTTOMRIGHT" relativeTo="$parentList" relativePoint="TOP" x="0" y="0" />
+                  </Anchors>
+              </FontString>
           </Layer>
         </Layers>
     </Frame>