Esempio n. 1
0
 public void Draw(IRogueUI ui, int freshMessagesTurn, int gx, int gy)
 {
     for (int index = 0; index < m_Messages.Count; ++index)
     {
         Message message = m_Messages[index];
         int     alpha   = Math.Max(64, (int)byte.MaxValue - m_FadeoutFactor * (m_Messages.Count - 1 - index));
         Color   color   = Color.FromArgb(alpha, message.Color);
         if (message.Turn >= freshMessagesTurn)
         {
             ui.UI_DrawStringBold(color, message.Text, gx, gy, new Color?());
         }
         else
         {
             ui.UI_DrawString(color, message.Text, gx, gy, new Color?());
         }
         gy += m_LinesSpacing;
     }
 }
Esempio n. 2
0
        public void Draw(IRogueUI ui, int freshMessagesTurn, int gx, int gy)
        {
            for (int i = 0; i < m_Messages.Count; i++)
            {
                Message msg = m_Messages[i];

                int   alpha       = Math.Max(64, 255 - m_FadeoutFactor * (m_Messages.Count - 1 - i));
                bool  isLatest    = (m_Messages[i].Turn >= freshMessagesTurn);
                Color dimmedColor = Color.FromArgb(alpha, msg.Color);

                if (isLatest)
                {
                    ui.UI_DrawStringBold(dimmedColor, msg.Text, gx, gy);
                }
                else
                {
                    ui.UI_DrawString(dimmedColor, msg.Text, gx, gy);
                }

                gy += m_LinesSpacing;
            }
        }