[color=red][b]$[/b][/color]
[color=green]// Gerar Picture da Fonte[/color]
[color=blue][b]if[/b][/color](Picture[[color=blue]100[/color]].AuroraSheet.IsEmpty())
Picture[[color=blue]100[/color]].Magnification = [color=blue]0[/color]; [color=blue][b]pause[/b][/color];
Picture[[color=blue]100[/color]].AuroraSheet.LoadFromFile([color=red]"Font\MsGothic.png"[/color]);
[color=blue][b]endif[/b][/color];
[color=green]// ------------------------------------------------------------------------[/color]
[color=blue][b]for[/b][/color](v[[color=blue]1[/color]] = [color=blue]1[/color]; v[[color=blue]1[/color]] <= Event.Count; v[[color=blue]1[/color]]++)
[color=green]// Não mostrar o nome se o evento possui o nome padrão (Ex.: "EV0001")[/color]
[color=blue][b]if[/b][/color](Event[v[[color=blue]1[/color]]].Name == [color=red]"EV"[/color]..String.Format([color=red]"D4"[/color],Convert.String(v[[color=blue]1[/color]])))
[color=blue][b]continue[/b][/color]; [color=green]// Parar o loop e recomeçar[/color]
[color=blue][b]endif[/b][/color];
[color=blue][b]if[/b][/color](Picture[v[[color=blue]1[/color]]].AuroraSheet.IsEmpty())
Picture[v[[color=blue]1[/color]]].AuroraSheet.Create(String.Length(Event[v[[color=blue]1[/color]]].Name)*[color=blue]8[/color]+[color=blue]8[/color],[color=blue]14[/color]);
Picture[v[[color=blue]1[/color]]].AuroraSheet.CopyPalette(Picture[[color=blue]100[/color]].AuroraSheet.Handle);
Picture[v[[color=blue]1[/color]]].UseMaskColor = [color=brown]true[/color];
[color=blue][b]if[/b][/color](String.Length(Event[v[[color=blue]1[/color]]].Name) >= [color=blue]10[/color])
[color=green]// Diminuir letras caso o nome seja muito grande[/color]
Picture[v[[color=blue]1[/color]]].Magnification = [color=blue]80[/color];
[color=blue][b]endif[/b][/color];
[color=green]// Extrair as letras da Picture 100 e colar na picture atual, formando o nome do evento[/color]
v[[color=blue]4[/color]] = [color=blue]0[/color];
[color=blue][b]for[/b][/color](v[[color=blue]2[/color]] = [color=blue]0[/color]; v[[color=blue]2[/color]] < String.Length(Event[v[[color=blue]1[/color]]].Name); v[[color=blue]2[/color]]++)
v[[color=blue]3[/color]] = String.Ord(Event[v[[color=blue]1[/color]]].Name,v[[color=blue]2[/color]]); [color=green]// Valor da caractere da string de acordo com a posição[/color]
[color=blue][b]if[/b][/color](String.Chr(v[[color=blue]3[/color]]) == [color=red]" "[/color])
[color=green]// Pular caractere caso seja um espaço[/color]
v[[color=blue]4[/color]] += [color=blue]4[/color];
[color=blue][b]continue[/b][/color];
[color=blue][b]endif[/b][/color];
[color=blue][b]if[/b][/color](v[[color=blue]3[/color]] > [color=blue]0x7E[/color]) v[[color=blue]3[/color]] -= [color=blue]0x22[/color]; [color=blue][b]endif[/b][/color]; [color=green]// Acertar ordem das caracteres para usar acentos[/color]
Picture[v[[color=blue]1[/color]]].CopyRect(v[[color=blue]4[/color]],[color=blue]0[/color],[color=blue]100[/color],((v[[color=blue]3[/color]]-[color=blue]33[/color])%[color=blue]32[/color])*[color=blue]9[/color],((v[[color=blue]3[/color]]-[color=blue]33[/color])/[color=blue]32[/color])*[color=blue]14[/color],((v[[color=blue]3[/color]]-[color=blue]33[/color])%[color=blue]32[/color])*[color=blue]9[/color]+[color=blue]9[/color],((v[[color=blue]3[/color]]-[color=blue]33[/color])/[color=blue]32[/color])*[color=blue]14[/color]+[color=blue]14[/color]);
v[[color=blue]4[/color]] += [color=blue]8[/color];
[color=blue][b]next[/b][/color];
[color=blue][b]endif[/b][/color];
[color=green]// Posicionar o nome em cima do evento[/color]
Picture[v[[color=blue]1[/color]]].X = Event[v[[color=blue]1[/color]]].ScreenX+[color=blue]4[/color];
Picture[v[[color=blue]1[/color]]].Y = Event[v[[color=blue]1[/color]]].ScreenY-[color=blue]32[/color];
[color=blue][b]next[/b][/color];