GraphicalLyricWord.ts 1.1 KB

1234567891011121314151617181920212223242526272829
  1. import {LyricWord} from "../VoiceData/Lyrics/LyricsWord";
  2. import {GraphicalLyricEntry} from "./GraphicalLyricEntry";
  3. export class GraphicalLyricWord {
  4. private lyricWord: LyricWord;
  5. private graphicalLyricsEntries: List<GraphicalLyricEntry> = new List<GraphicalLyricEntry>();
  6. constructor(lyricWord: LyricWord) {
  7. this.lyricWord = lyricWord;
  8. this.initialize();
  9. }
  10. public get GetLyricWord(): LyricWord {
  11. return this.lyricWord;
  12. }
  13. public get GraphicalLyricsEntries(): List<GraphicalLyricEntry> {
  14. return this.graphicalLyricsEntries;
  15. }
  16. public set GraphicalLyricsEntries(value: List<GraphicalLyricEntry>) {
  17. this.graphicalLyricsEntries = value;
  18. }
  19. public isFilled(): boolean {
  20. for (var i: number = 0; i < this.graphicalLyricsEntries.Count; i++)
  21. if (this.graphicalLyricsEntries[i] == null)
  22. return false;
  23. return true;
  24. }
  25. private initialize(): void {
  26. for (var i: number = 0; i < this.lyricWord.Syllables.Count; i++)
  27. this.graphicalLyricsEntries.Add(null);
  28. }
  29. }