public override void LoadTheme() { //Vocaluxe-Logo CDataBase.GetCreditsRessource("Logo_voc.png", ref _TexLogo); //Little stars for logo CDataBase.GetCreditsRessource("PerfectNoteStar.png", ref _TexPerfectNoteStar); //brunzel CDataBase.GetCreditsRessource("brunzel.png", ref _TexNameBrunzel); //Darkice CDataBase.GetCreditsRessource("Darkice.png", ref _TexNameDarkice); //flokuep CDataBase.GetCreditsRessource("flokuep.png", ref _TexNameFlokuep); //bohning CDataBase.GetCreditsRessource("bohning.png", ref _TexNameBohning); //mesand CDataBase.GetCreditsRessource("mesand.png", ref _TexNameMesand); //babene03 CDataBase.GetCreditsRessource("babene03.png", ref _TexNameBabene03); //pantero CDataBase.GetCreditsRessource("pantero.png", ref _TexNamePantero); //Pinky007 CDataBase.GetCreditsRessource("Pinky007.png", ref _TexNamePinky007); //Prepare Text int lastY = 280; for (int i = 0; i < paragraphs.Count; i++) { string line = ""; for (int e = 0; e < paragraphs[i].Length; e++) { if (paragraphs[i][e] != null) { string newline = line + " " + paragraphs[i][e]; CText text = new CText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line); if (CDraw.GetTextBounds(text).Width < (CSettings.iRenderW - 220)) { line = line + " " + paragraphs[i][e]; //Check if all words are used if ((e + 1) == paragraphs[i].Length) { text.Text = line; paragraphTexts.Add(text); line = ""; lastY += 40; } } else { paragraphTexts.Add(text); line = " " + paragraphs[i][e]; lastY += 27; } } } } }
public override void LoadTheme(string xmlPath) { bool ressourceOK = true; //Vocaluxe-Logo ressourceOK &= CDataBase.GetCreditsRessource("Logo_voc.png", ref _TexLogo); //Little stars for logo ressourceOK &= CDataBase.GetCreditsRessource("PerfectNoteStar.png", ref _TexPerfectNoteStar); ressourceOK &= CDataBase.GetCreditsRessource("redDot.png", ref _TexRedDot); ressourceOK &= CDataBase.GetCreditsRessource("blueDot.png", ref _TexBlueDot); ressourceOK &= CDataBase.GetCreditsRessource("brunzel.png", ref _TexNameBrunzel); ressourceOK &= CDataBase.GetCreditsRessource("Darkice.png", ref _TexNameDarkice); ressourceOK &= CDataBase.GetCreditsRessource("flokuep.png", ref _TexNameFlokuep); ressourceOK &= CDataBase.GetCreditsRessource("flamefire.png", ref _TexNameFlamefire); ressourceOK &= CDataBase.GetCreditsRessource("lukeIam.png", ref _TexNameLukeIam); ressourceOK &= CDataBase.GetCreditsRessource("bohning.png", ref _TexNameBohning); ressourceOK &= CDataBase.GetCreditsRessource("mesand.png", ref _TexNameMesand); ressourceOK &= CDataBase.GetCreditsRessource("babene03.png", ref _TexNameBabene03); if (!ressourceOK) { CLog.Fatal("Could not load all ressources!"); } //Prepare Text int lastY = 280; foreach (string[] paragraph in _Paragraphs) { string line = ""; for (int e = 0; e < paragraph.Length; e++) { if (paragraph[e] == null) { continue; } string newLine = " " + paragraph[e]; CText text = GetNewText(75, lastY, -2, 25, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line); text.Visible = false; if (CFonts.GetTextBounds(text).Width < (CSettings.RenderW - 220)) { line += newLine; //Check if all words are used if ((e + 1) == paragraph.Length) { text.Text = line; _ParagraphTexts.Add(text); line = ""; lastY += 40; } } else { _ParagraphTexts.Add(text); line = newLine; lastY += 27; } _AddText(text); } } CBackground bg = new CBackground(_BGTheme, -1); bg.LoadSkin(); _AddBackground(bg); //Vocaluxe-Logo _Logo = GetNewStatic(_TexLogo, new SColorF(1, 1, 1, 1), new SRectF((float)(CSettings.RenderW - _TexLogo.OrigSize.Width) / 2, -270, _TexLogo.OrigSize.Width, _TexLogo.OrigSize.Height, -2)); _AddStatic(_Logo); //Little stars for logo var numstars = (int)(_Logo.Rect.W * 0.25f / 2f); var partRect = new SRectF(_Logo.Rect.X, _Logo.Rect.Y, _Logo.Rect.W, _Logo.Rect.H, -1); _StarsRed = _GetStarParticles(numstars, true, partRect, true); _StarsBlue = _GetStarParticles(numstars, false, partRect, true); _AddParticleEffect(_StarsRed); _AddParticleEffect(_StarsBlue); //Credit names _CreditNames = new List <CCreditName>(); _AddNewCreditName(_TexNameBrunzel, 502, 29, true); _AddNewCreditName(_TexNameDarkice, 360, 55, true); _AddNewCreditName(_TexNameFlokuep, 214, 14, true); _AddNewCreditName(_TexNameFlamefire, 496, 46, true); _AddNewCreditName(_TexNameLukeIam, 411, 26, true); _AddNewCreditName(_TexNameBohning, 383, 54, false); _AddNewCreditName(_TexNameMesand, 525, 13, false); _AddNewCreditName(_TexNameBabene03, 33, 26, false); _AddTranslations(); }