예제 #1
0
        public Screen_Credits(string preCreditsMessage)
        {
            doWindowBackground = false;
            doCloseButton      = false;
            doCloseX           = false;
            forcePause         = true;
            creds = CreditsAssembler.AllCredits().ToList();
            creds.Insert(0, new CreditRecord_Space(100f));
            if (!preCreditsMessage.NullOrEmpty())
            {
                creds.Insert(1, new CreditRecord_Space(200f));
                creds.Insert(2, new CreditRecord_Text(preCreditsMessage));
                creds.Insert(3, new CreditRecord_Space(50f));
                Text.Font         = GameFont.Medium;
                victoryTextHeight = creds.Take(4).Sum((CreditsEntry c) => c.DrawHeight(ViewWidth));
            }
            creds.Add(new CreditRecord_Space(300f));
            creds.Add(new CreditRecord_Text("ThanksForPlaying".Translate(), TextAnchor.UpperCenter));
            string text = string.Empty;

            foreach (CreditsEntry cred in creds)
            {
                CreditRecord_Role creditRecord_Role = cred as CreditRecord_Role;
                if (creditRecord_Role == null)
                {
                    text = string.Empty;
                }
                else
                {
                    creditRecord_Role.displayKey = (text.NullOrEmpty() || creditRecord_Role.roleKey != text);
                    text = creditRecord_Role.roleKey;
                }
            }
        }
 public Screen_Credits(string preCreditsMessage)
 {
     this.doWindowBackground = false;
     this.doCloseButton      = false;
     this.doCloseX           = false;
     this.forcePause         = true;
     this.creds = CreditsAssembler.AllCredits().ToList <CreditsEntry>();
     this.creds.Insert(0, new CreditRecord_Space(100f));
     if (!preCreditsMessage.NullOrEmpty())
     {
         this.creds.Insert(1, new CreditRecord_Space(200f));
         this.creds.Insert(2, new CreditRecord_Text(preCreditsMessage, TextAnchor.UpperLeft));
         this.creds.Insert(3, new CreditRecord_Space(50f));
     }
     this.creds.Add(new CreditRecord_Space(300f));
     this.creds.Add(new CreditRecord_Text("ThanksForPlaying".Translate(), TextAnchor.UpperCenter));
 }