|
传奇游戏传奇彩色文字的实现(delphi源码)在DrawScrn.pas单元找到下面的代码段
- SetBkMode (Canvas.Handle, TRANSPARENT);
- if (g_FocusCret <> nil) and PlayScene.IsValidActor (g_FocusCret) then begin
- //if FocusCret.Grouped then uname := char(7) + FocusCret.UserName
- //else
- uname := g_FocusCret.m_sDescUserName + '\' + g_FocusCret.m_sUserName;
- NameTextOut (MSurface,
- g_FocusCret.m_nSayX, // - Canvas.TextWidth(uname) div 2,
- g_FocusCret.m_nSayY + 30,
- g_FocusCret.m_nNameColor, clred,
- uname);
- end;
- //控制玩家名字的颜色
- if g_boSelectMyself then begin
- uname := g_MySelf.m_sDescUserName + '\' + g_MySelf.m_sUserName;
- NameTextOut (MSurface,
- g_MySelf.m_nSayX, // - Canvas.TextWidth(uname) div 2,
- g_MySelf.m_nSayY + 30,
- g_MySelf.m_nNameColor, clblue,
- uname);
- end;
- //控制玩家说话的颜色(头顶上的字体颜色)
- BoldTextOut (MSurface,
- actor.m_nSayX - (actor.m_SayWidthsArr div 2),
- actor.m_nSayY - (actor.m_nSayLineCount*16) + i*14,
- clWhite, clblue,
- actor.m_SayingArr);
- //控制人物死亡后说话的颜色(头顶上的字体颜色)
- BoldTextOut (MSurface,
- actor.m_nSayX - (actor.m_SayWidthsArr div 2),
- actor.m_nSayY - (actor.m_nSayLineCount*16) + i*14,
- clGray, clLime,
- actor.m_SayingArr)
复制代码
|
|