Since text area is always limited and has very specific boundaries within application screen it’s easy to define an instance of text box element – an area inside which given text appears. Text box main features are its width and height, because text placed in given text box is not allowed to appear outside of it (see provided image for reference). Knowing height and width of each character printed out in textbox a general set of rules for text placement within a box can be created. While considering TextBox as a class, developer needs to think about main features that should be provided for game designer: positioning of text box on the screen, positioning of the text inside text box, smart new line detection, meaning both automatic detection and user defined new paragraph detection, smart text scrolling, and text scrolling indicators, text box look and feel parameters, meaning background colour, text area background colour, border colour, scrolling indicators style and text font.
Text Box diagram - simple image showing the idea implemented in mobilePack.
No comments:
Post a Comment