SUGGESTIONS: Text Overlay alignment, GetSkipSpeech, and Game.FontCount

Started by monkey0506, Thu 03/08/2006 23:10:57

Previous topic - Next topic

monkey0506

Overlay.CreateTextual optional alignment parameter

I've been working on updating my PersistentSpeech module because I plan to make it compatible with my QueuedSpeech module so that you can run queued persistent speech. However, I've noticed in some of my testing that when using Overlay.CreateTextual the text is automatically left-aligned. I know how to center the text using GetTextWidth, however if the text spans more than one line the second line of text is left-aligned and there's no way to center it.

I'm not sure how difficult (and/or reasonable) to implement it would be, but I think it would be nice if there was an optional Alignment parameter for Overlay.CreateTextual (default to eAlignLeft) so that we could align the text to the right or to the centre. That way I could make these overlays look more like Character speech handled by the engine looks (automatically centred).

GetSkipSpeech

There's an option to set the skip-speech style, but nothing to retrieve it. This would be useful for my modules so they could remove the speech based on this setting.

Game.FontCount

This would be useful to know how many fonts are actually included in the game. Currently there's no way to get this number so font parameters to custom functions are potentially hazardous because there is no maximum bounds checking.

[EDIT:]

I edited this thread to add two more suggestions instead of creating two more threads. Go me. :P

SSH

Hear hear to all of these. The overlay alignment would be particularly handy for my credits module
12

Alynn

Ditto on the FontCount... Would make me able to put error checking in my module so that the user can't assign a non existant font

monkey0506

Hmm...I'm not sure now if CJ will go for the Overlay alignment because it seems that Overlay.CreateTextual allows you to format the string...

I'm not really sure what the best idea would be to try and convince him to implement...maybe the fact that if the user needs to format the string they can use String.Format in place of the text parameter? It kills backwards compatibility though...I don't know...maybe if CJ replies we can see what he thinks.

Pumaman

They sound like reasonable suggestions to me. We'd have to have a new function since CreateTextual allows formatting -- just so long as it's not CreateTextualEx!!
:)

monkey0506

CreateTextualAligned would sound reasonable to me...but that's up to you. :=

Glad you liked my suggestions. :D


SMF spam blocked by CleanTalk