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; } }
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; } }
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(); }
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(); }