Jump to content
  • Advertisement
Sign in to follow this  
pyropaul2

MDX C# Scrolling Banner with MultiColoured Text

This topic is 3159 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, I've created a scrolling banner, using C# and MDX, that uses (at the moment) the Font.DrawText function. The scroll smoothness is TV quality and in general I pleased with the performance. The only concern is with the string size which, if quite large, consumes a greater amount of processor. To deal with this, I'll cut the text string up according to what will be displayed in the rectangle and not use the whole text string. However, can someone please advise me on the following: What is the best approach to achieve multi coloured text? I would like to include, in the text, separator characters with a different colour (for example, a blue square separating news items). I guess this'll mean not using Font.DrawText. Therefore what is the best approach to achieve this? Many thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Cut the string up into segments based on properties (in this case, color) and call DrawText for each segment; that will be the most direct approach and will probably work fine, depending on your actual usage.

Share this post


Link to post
Share on other sites
Many thanks jpetrie.

That was along the lines I was thinking but being quite new to this, I was not sure if this was the best way of doing this.

Again, thank you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!