This update adds Messages and a MessageMgr to handle them.  This was designed to be easy to call – just call AddMessage with text and color, and the messagemgr handles scrolling messages etc.  A few nice extras:

  • The MessageMgr fades out messages after a period of time
  • Text is properly wrapped due to a quick DrawWrappedString function I added to RenderMgr.

Things I might add later:

  • Give users the ability to press on the message window and drag up to see more messages.
  • instead of specifying color, the caller specifies a category enum for the message; this way if I decide to change all damage-to-player messages to red later, then I only have to change it in one place.

Here’s what it looks like in action:

Updated source: http://wanderlinggames.com/files/dungeon/dungeon-3-19-11b.zip

Updated executable: http://wanderlinggames.com/files/dungeon/dungeonexe-3-19-11b.zip

Advertisements