MultilineEditbox and '\n'

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
spracle
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Aug 24, 2010 07:29

MultilineEditbox and '\n'

Postby spracle » Sat Mar 26, 2011 10:09

//----------------------------------------------------------------------------//
void MultiLineEditboxWindowRenderer::onLookNFeelAssigned()
{
assert(d_window != 0);

// ensure window's text has a terminating \n
String text(d_window->getText());
if (text.empty() || text[text.length() - 1] != '\n')
{
text.append(1, '\n');
d_window->setText(text);
}
}

——Why to append '\n' here? Confusing :?:

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 2 guests