From 7a01b05b3861a667eb32ce2e0fc88ff3bacb99ae Mon Sep 17 00:00:00 2001 From: mogguh Date: Tue, 2 Sep 2008 17:25:26 +0000 Subject: Moved: The folder classes has been renamed to base Updated: ultrastardx.dpr has been changed accordingly git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1339 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 229 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 src/base/UEditorLyrics.pas (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas new file mode 100644 index 00000000..25e8423e --- /dev/null +++ b/src/base/UEditorLyrics.pas @@ -0,0 +1,229 @@ +unit UEditorLyrics; + +interface + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + +uses + SysUtils, + gl, + UMusic, + UTexture; + +type + TWord = record + X: real; + Y: real; + Size: real; + Width: real; + Text: string; + ColR: real; + ColG: real; + ColB: real; + FontStyle: integer; + Italic: boolean; + Selected: boolean; + end; + + TEditorLyrics = class + private + AlignI: integer; + XR: real; + YR: real; + SizeR: real; + SelectedI: integer; + FontStyleI: integer; // font number + Word: array of TWord; + + procedure SetX(Value: real); + procedure SetY(Value: real); + function GetClientX: real; + procedure SetAlign(Value: integer); + function GetSize: real; + procedure SetSize(Value: real); + procedure SetSelected(Value: integer); + procedure SetFStyle(Value: integer); + procedure AddWord(Text: string); + procedure Refresh; + public + ColR: real; + ColG: real; + ColB: real; + ColSR: real; + ColSG: real; + ColSB: real; + Italic: boolean; + + constructor Create; + destructor Destroy; override; + + procedure AddLine(NrLine: integer); + + procedure Clear; + procedure Draw; + published + property X: real write SetX; + property Y: real write SetY; + property ClientX: real read GetClientX; + property Align: integer write SetAlign; + property Size: real read GetSize write SetSize; + property Selected: integer read SelectedI write SetSelected; + property FontStyle: integer write SetFStyle; + end; + +implementation + +uses + TextGL, UGraphic, UDrawTexture, Math, USkins; + +constructor TEditorLyrics.Create; +begin + inherited; +end; + +destructor TEditorLyrics.Destroy; +begin + SetLength(Word, 0); + inherited; +end; + +procedure TEditorLyrics.SetX(Value: real); +begin + XR := Value; +end; + +procedure TEditorLyrics.SetY(Value: real); +begin + YR := Value; +end; + +function TEditorLyrics.GetClientX: real; +begin + Result := Word[0].X; +end; + +procedure TEditorLyrics.SetAlign(Value: integer); +begin + AlignI := Value; +end; + +function TEditorLyrics.GetSize: real; +begin + Result := SizeR; +end; + +procedure TEditorLyrics.SetSize(Value: real); +begin + SizeR := Value; +end; + +procedure TEditorLyrics.SetSelected(Value: integer); +var + W: integer; +begin + if (SelectedI > -1) and (SelectedI <= High(Word)) then + begin + Word[SelectedI].Selected := false; + Word[SelectedI].ColR := ColR; + Word[SelectedI].ColG := ColG; + Word[SelectedI].ColB := ColB; + end; + + SelectedI := Value; + if (Value > -1) and (Value <= High(Word)) then + begin + Word[Value].Selected := true; + Word[Value].ColR := ColSR; + Word[Value].ColG := ColSG; + Word[Value].ColB := ColSB; + end; + + Refresh; +end; + +procedure TEditorLyrics.SetFStyle(Value: integer); +begin + FontStyleI := Value; +end; + +procedure TEditorLyrics.AddWord(Text: string); +var + WordNum: integer; +begin + WordNum := Length(Word); + SetLength(Word, WordNum + 1); + if WordNum = 0 then begin + Word[WordNum].X := XR; + end else begin + Word[WordNum].X := Word[WordNum - 1].X + Word[WordNum - 1].Width; + end; + + Word[WordNum].Y := YR; + Word[WordNum].Size := SizeR; + Word[WordNum].FontStyle := FontStyleI; + SetFontStyle(FontStyleI); + SetFontSize(SizeR); + Word[WordNum].Width := glTextWidth(pchar(Text)); + Word[WordNum].Text := Text; + Word[WordNum].ColR := ColR; + Word[WordNum].ColG := ColG; + Word[WordNum].ColB := ColB; + Word[WordNum].Italic := Italic; + + Refresh; +end; + +procedure TEditorLyrics.AddLine(NrLine: integer); +var + N: integer; +begin + Clear; + for N := 0 to Lines[0].Line[NrLine].HighNote do begin + Italic := Lines[0].Line[NrLine].Note[N].NoteType = ntFreestyle; + AddWord(Lines[0].Line[NrLine].Note[N].Text); + end; + Selected := -1; +end; + +procedure TEditorLyrics.Clear; +begin + SetLength(Word, 0); + SelectedI := -1; +end; + +procedure TEditorLyrics.Refresh; +var + W: integer; + TotWidth: real; +begin + if AlignI = 1 then begin + TotWidth := 0; + for W := 0 to High(Word) do + TotWidth := TotWidth + Word[W].Width; + + Word[0].X := XR - TotWidth / 2; + for W := 1 to High(Word) do + Word[W].X := Word[W - 1].X + Word[W - 1].Width; + end; +end; + +procedure TEditorLyrics.Draw; +var + W: integer; +begin + for W := 0 to High(Word) do + begin + SetFontStyle(Word[W].FontStyle); + SetFontPos(Word[W].X+ 10*ScreenX, Word[W].Y); + SetFontSize(Word[W].Size); + SetFontItalic(Word[W].Italic); + glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB); + glPrint(pchar(Word[W].Text)); + end; +end; + +end. -- cgit v1.2.3 From dbf39d5bfc56c24a67d481187c619dc84828221f Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 23 Sep 2008 21:17:22 +0000 Subject: gpl header added and property svn:header set to "HeadURL Id" git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1403 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 25e8423e..e307ba2d 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -1,3 +1,28 @@ +{* UltraStar Deluxe - Karaoke Game + * + * UltraStar Deluxe is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + *} + unit UEditorLyrics; interface -- cgit v1.2.3 From e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 28 Oct 2008 18:57:02 +0000 Subject: - glPrint(Pchar) -> glPrint(string) - glPrintLetter removed - font engine handles FT_PIXEL_MODE_MONO as FT_Glyph_To_Bitmap(FT_RENDER_MODE_NORMAL) might return a 1bit/pixel black/white image instead of 8bit/pixel gray shaded one (happened with 16px japanese glyphs of simsun.ttf, latin ones were correct). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1482 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index e307ba2d..3c4ddb24 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -192,7 +192,7 @@ begin Word[WordNum].FontStyle := FontStyleI; SetFontStyle(FontStyleI); SetFontSize(SizeR); - Word[WordNum].Width := glTextWidth(pchar(Text)); + Word[WordNum].Width := glTextWidth(Text); Word[WordNum].Text := Text; Word[WordNum].ColR := ColR; Word[WordNum].ColG := ColG; @@ -247,7 +247,7 @@ begin SetFontSize(Word[W].Size); SetFontItalic(Word[W].Italic); glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB); - glPrint(pchar(Word[W].Text)); + glPrint(Word[W].Text); end; end; -- cgit v1.2.3 From 6585afce2ccd8e7c5ccb3bb3599d4723b00a0433 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 28 Oct 2008 20:16:05 +0000 Subject: some compiler warnings/hints removed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1485 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 3c4ddb24..d06fc891 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -147,8 +147,6 @@ begin end; procedure TEditorLyrics.SetSelected(Value: integer); -var - W: integer; begin if (SelectedI > -1) and (SelectedI <= High(Word)) then begin -- cgit v1.2.3 From 8c480db528416d95aeb4e6cc070960b6ea1215bb Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 24 Nov 2008 23:26:10 +0000 Subject: some format changes and minor code rearrangements. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1524 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 89 ++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 42 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index d06fc891..0b16110f 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -41,28 +41,28 @@ uses type TWord = record - X: real; - Y: real; - Size: real; - Width: real; - Text: string; - ColR: real; - ColG: real; - ColB: real; - FontStyle: integer; - Italic: boolean; - Selected: boolean; + X: real; + Y: real; + Size: real; + Width: real; + Text: string; + ColR: real; + ColG: real; + ColB: real; + FontStyle: integer; + Italic: boolean; + Selected: boolean; end; TEditorLyrics = class private - AlignI: integer; - XR: real; - YR: real; - SizeR: real; - SelectedI: integer; - FontStyleI: integer; // font number - Word: array of TWord; + AlignI: integer; + XR: real; + YR: real; + SizeR: real; + SelectedI: integer; + FontStyleI: integer; // font number + Word: array of TWord; procedure SetX(Value: real); procedure SetY(Value: real); @@ -71,17 +71,17 @@ type function GetSize: real; procedure SetSize(Value: real); procedure SetSelected(Value: integer); - procedure SetFStyle(Value: integer); + procedure SetFontStyle(Value: integer); procedure AddWord(Text: string); procedure Refresh; public - ColR: real; - ColG: real; - ColB: real; - ColSR: real; - ColSG: real; - ColSB: real; - Italic: boolean; + ColR: real; + ColG: real; + ColB: real; + ColSR: real; + ColSG: real; + ColSB: real; + Italic: boolean; constructor Create; destructor Destroy; override; @@ -97,13 +97,17 @@ type property Align: integer write SetAlign; property Size: real read GetSize write SetSize; property Selected: integer read SelectedI write SetSelected; - property FontStyle: integer write SetFStyle; + property FontStyle: integer write SetFontStyle; end; implementation uses - TextGL, UGraphic, UDrawTexture, Math, USkins; + TextGL, + UGraphic, + UDrawTexture, + Math, + USkins; constructor TEditorLyrics.Create; begin @@ -148,7 +152,7 @@ end; procedure TEditorLyrics.SetSelected(Value: integer); begin - if (SelectedI > -1) and (SelectedI <= High(Word)) then + if (-1 < SelectedI) and (SelectedI <= High(Word)) then begin Word[SelectedI].Selected := false; Word[SelectedI].ColR := ColR; @@ -157,7 +161,7 @@ begin end; SelectedI := Value; - if (Value > -1) and (Value <= High(Word)) then + if (-1 < Value) and (Value <= High(Word)) then begin Word[Value].Selected := true; Word[Value].ColR := ColSR; @@ -168,22 +172,21 @@ begin Refresh; end; -procedure TEditorLyrics.SetFStyle(Value: integer); +procedure TEditorLyrics.SetFontStyle(Value: integer); begin FontStyleI := Value; end; procedure TEditorLyrics.AddWord(Text: string); var - WordNum: integer; + WordNum: integer; begin WordNum := Length(Word); SetLength(Word, WordNum + 1); - if WordNum = 0 then begin - Word[WordNum].X := XR; - end else begin + if WordNum = 0 then + Word[WordNum].X := XR + else Word[WordNum].X := Word[WordNum - 1].X + Word[WordNum - 1].Width; - end; Word[WordNum].Y := YR; Word[WordNum].Size := SizeR; @@ -202,10 +205,11 @@ end; procedure TEditorLyrics.AddLine(NrLine: integer); var - N: integer; + N: integer; begin Clear; - for N := 0 to Lines[0].Line[NrLine].HighNote do begin + for N := 0 to Lines[0].Line[NrLine].HighNote do + begin Italic := Lines[0].Line[NrLine].Note[N].NoteType = ntFreestyle; AddWord(Lines[0].Line[NrLine].Note[N].Text); end; @@ -220,10 +224,11 @@ end; procedure TEditorLyrics.Refresh; var - W: integer; - TotWidth: real; + W: integer; + TotWidth: real; begin - if AlignI = 1 then begin + if AlignI = 1 then + begin TotWidth := 0; for W := 0 to High(Word) do TotWidth := TotWidth + Word[W].Width; @@ -236,7 +241,7 @@ end; procedure TEditorLyrics.Draw; var - W: integer; + W: integer; begin for W := 0 to High(Word) do begin -- cgit v1.2.3 From 65a64b2404ae4e7c4c5e75724e25a1189c29c3ad Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 26 Nov 2008 21:38:59 +0000 Subject: replace integer by enumeration type alignment git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1526 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 0b16110f..485fabe8 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -40,23 +40,25 @@ uses UTexture; type + alignment = (left, center, right); + TWord = record - X: real; - Y: real; - Size: real; - Width: real; - Text: string; - ColR: real; - ColG: real; - ColB: real; - FontStyle: integer; - Italic: boolean; - Selected: boolean; + X: real; + Y: real; + Size: real; + Width: real; + Text: string; + ColR: real; + ColG: real; + ColB: real; + FontStyle: integer; + Italic: boolean; + Selected: boolean; end; TEditorLyrics = class private - AlignI: integer; + AlignI: alignment; XR: real; YR: real; SizeR: real; @@ -67,7 +69,7 @@ type procedure SetX(Value: real); procedure SetY(Value: real); function GetClientX: real; - procedure SetAlign(Value: integer); + procedure SetAlign(Value: alignment); function GetSize: real; procedure SetSize(Value: real); procedure SetSelected(Value: integer); @@ -94,7 +96,7 @@ type property X: real write SetX; property Y: real write SetY; property ClientX: real read GetClientX; - property Align: integer write SetAlign; + property Align: alignment write SetAlign; property Size: real read GetSize write SetSize; property Selected: integer read SelectedI write SetSelected; property FontStyle: integer write SetFontStyle; @@ -103,10 +105,10 @@ type implementation uses - TextGL, - UGraphic, - UDrawTexture, - Math, + TextGL, + UGraphic, + UDrawTexture, + Math, USkins; constructor TEditorLyrics.Create; @@ -135,7 +137,7 @@ begin Result := Word[0].X; end; -procedure TEditorLyrics.SetAlign(Value: integer); +procedure TEditorLyrics.SetAlign(Value: alignment); begin AlignI := Value; end; @@ -183,7 +185,7 @@ var begin WordNum := Length(Word); SetLength(Word, WordNum + 1); - if WordNum = 0 then + if WordNum = 0 then Word[WordNum].X := XR else Word[WordNum].X := Word[WordNum - 1].X + Word[WordNum - 1].Width; @@ -227,7 +229,7 @@ var W: integer; TotWidth: real; begin - if AlignI = 1 then + if AlignI = center then begin TotWidth := 0; for W := 0 to High(Word) do -- cgit v1.2.3 From 680a6a4fe7ee80d513d45b09ffeecd509afc7696 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 26 Nov 2008 22:39:28 +0000 Subject: names of variables changed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1527 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 485fabe8..fe8c3ee5 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -207,13 +207,13 @@ end; procedure TEditorLyrics.AddLine(NrLine: integer); var - N: integer; + NoteIndex: integer; begin Clear; - for N := 0 to Lines[0].Line[NrLine].HighNote do + for NoteIndex := 0 to Lines[0].Line[NrLine].HighNote do begin - Italic := Lines[0].Line[NrLine].Note[N].NoteType = ntFreestyle; - AddWord(Lines[0].Line[NrLine].Note[N].Text); + Italic := Lines[0].Line[NrLine].Note[NoteIndex].NoteType = ntFreestyle; + AddWord(Lines[0].Line[NrLine].Note[NoteIndex].Text); end; Selected := -1; end; @@ -226,33 +226,33 @@ end; procedure TEditorLyrics.Refresh; var - W: integer; - TotWidth: real; + WordIndex: integer; + TotalWidth: real; begin if AlignI = center then begin - TotWidth := 0; - for W := 0 to High(Word) do - TotWidth := TotWidth + Word[W].Width; + TotalWidth := 0; + for WordIndex := 0 to High(Word) do + TotalWidth := TotalWidth + Word[WordIndex].Width; - Word[0].X := XR - TotWidth / 2; - for W := 1 to High(Word) do - Word[W].X := Word[W - 1].X + Word[W - 1].Width; + Word[0].X := XR - TotalWidth / 2; + for WordIndex := 1 to High(Word) do + Word[WordIndex].X := Word[WordIndex - 1].X + Word[WordIndex - 1].Width; end; end; procedure TEditorLyrics.Draw; var - W: integer; + WordIndex: integer; begin - for W := 0 to High(Word) do + for WordIndex := 0 to High(Word) do begin - SetFontStyle(Word[W].FontStyle); - SetFontPos(Word[W].X+ 10*ScreenX, Word[W].Y); - SetFontSize(Word[W].Size); - SetFontItalic(Word[W].Italic); - glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB); - glPrint(Word[W].Text); + SetFontStyle(Word[WordIndex].FontStyle); + SetFontPos(Word[WordIndex].X + 10*ScreenX, Word[WordIndex].Y); + SetFontSize(Word[WordIndex].Size); + SetFontItalic(Word[WordIndex].Italic); + glColor3f(Word[WordIndex].ColR, Word[WordIndex].ColG, Word[WordIndex].ColB); + glPrint(Word[WordIndex].Text); end; end; -- cgit v1.2.3 From 442fe6a73506979404f2d1f7bb2c2cffa4b69054 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 6 Apr 2009 22:17:39 +0000 Subject: bring the type align to our coding standards git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1658 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index fe8c3ee5..ef9d8dd6 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -40,7 +40,7 @@ uses UTexture; type - alignment = (left, center, right); + TAlignmentType = (atLeft, atCenter, atRight); TWord = record X: real; @@ -58,7 +58,7 @@ type TEditorLyrics = class private - AlignI: alignment; + AlignI: TAlignmentType; XR: real; YR: real; SizeR: real; @@ -69,7 +69,7 @@ type procedure SetX(Value: real); procedure SetY(Value: real); function GetClientX: real; - procedure SetAlign(Value: alignment); + procedure SetAlign(Value: TAlignmentType); function GetSize: real; procedure SetSize(Value: real); procedure SetSelected(Value: integer); @@ -96,7 +96,7 @@ type property X: real write SetX; property Y: real write SetY; property ClientX: real read GetClientX; - property Align: alignment write SetAlign; + property Align: TAlignmentType write SetAlign; property Size: real read GetSize write SetSize; property Selected: integer read SelectedI write SetSelected; property FontStyle: integer write SetFontStyle; @@ -137,7 +137,7 @@ begin Result := Word[0].X; end; -procedure TEditorLyrics.SetAlign(Value: alignment); +procedure TEditorLyrics.SetAlign(Value: TAlignmentType); begin AlignI := Value; end; @@ -229,7 +229,7 @@ var WordIndex: integer; TotalWidth: real; begin - if AlignI = center then + if AlignI = atCenter then begin TotalWidth := 0; for WordIndex := 0 to High(Word) do -- cgit v1.2.3 From 917901e8e33438c425aef50a0a7417f32d77b760 Mon Sep 17 00:00:00 2001 From: s_alexander Date: Mon, 9 Nov 2009 00:27:55 +0000 Subject: merged unicode branch (r1931) into trunk git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index ef9d8dd6..0eacd1f9 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -74,7 +74,7 @@ type procedure SetSize(Value: real); procedure SetSelected(Value: integer); procedure SetFontStyle(Value: integer); - procedure AddWord(Text: string); + procedure AddWord(Text: UTF8String); procedure Refresh; public ColR: real; @@ -179,7 +179,7 @@ begin FontStyleI := Value; end; -procedure TEditorLyrics.AddWord(Text: string); +procedure TEditorLyrics.AddWord(Text: UTF8String); var WordNum: integer; begin -- cgit v1.2.3 From cb8cc3c455ade321861e92829498cdf4f2c26a9b Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Fri, 11 Jun 2010 15:54:50 +0000 Subject: fix wrong lyric spacing in editor after editing a sentence whose last syllable is freestyle git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2488 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UEditorLyrics.pas | 1 + 1 file changed, 1 insertion(+) (limited to 'src/base/UEditorLyrics.pas') diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 0eacd1f9..5030eff5 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -195,6 +195,7 @@ begin Word[WordNum].FontStyle := FontStyleI; SetFontStyle(FontStyleI); SetFontSize(SizeR); + SetFontItalic(Italic); Word[WordNum].Width := glTextWidth(Text); Word[WordNum].Text := Text; Word[WordNum].ColR := ColR; -- cgit v1.2.3