Ejemplo 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;
     }
 }
Ejemplo 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;
            }
        }
Ejemplo n.º 3
0
 static void Notify(IRogueUI ui, string what, string stage)
 {
     ui.UI_Clear(Color.Black);
     ui.UI_DrawStringBold(Color.White, "Loading " + what + " data : " + stage, 0, 0);
     ui.UI_Repaint();
 }
Ejemplo n.º 4
0
 static void Notify(IRogueUI ui, string stage)
 {
     ui.UI_Clear(Color.Black);
     ui.UI_DrawStringBold(Color.White, "Loading resources: " + stage, 0, 0);
     ui.UI_Repaint();
 }