|
|
|
@ -1537,25 +1537,23 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
void CGroupEditBox::setup()
|
|
|
|
|
{
|
|
|
|
|
// bind to the controls
|
|
|
|
|
_ViewText = dynamic_cast<CViewText *>(CInterfaceGroup::getView("edit_text"));
|
|
|
|
|
|
|
|
|
|
if(_ViewText == NULL)
|
|
|
|
|
void CGroupEditBox::createViewText()
|
|
|
|
|
{
|
|
|
|
|
nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type");
|
|
|
|
|
if( editorMode )
|
|
|
|
|
{
|
|
|
|
|
nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() );
|
|
|
|
|
_ViewText = dynamic_cast< CViewText* >( CInterfaceFactory::createClass( "text" ) );
|
|
|
|
|
if( _ViewText != NULL )
|
|
|
|
|
if( _ViewText == NULL )
|
|
|
|
|
{
|
|
|
|
|
nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() );
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_ViewText->setParent( this );
|
|
|
|
|
_ViewText->setIdRecurse( "edit_text" );
|
|
|
|
|
_ViewText->setHardText( "" );
|
|
|
|
|
_ViewText->setPosRef( Hotspot_TL );
|
|
|
|
|
_ViewText->setParentPosRef( Hotspot_TL );
|
|
|
|
|
_ViewText->setPosRef( Hotspot_ML );
|
|
|
|
|
_ViewText->setParentPosRef( Hotspot_ML );
|
|
|
|
|
addView( _ViewText );
|
|
|
|
|
|
|
|
|
|
sint32 w,h;
|
|
|
|
@ -1564,13 +1562,18 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
setH( h );
|
|
|
|
|
setW( w );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
void CGroupEditBox::setup()
|
|
|
|
|
{
|
|
|
|
|
// bind to the controls
|
|
|
|
|
if( _ViewText == NULL )
|
|
|
|
|
_ViewText = dynamic_cast<CViewText *>(CInterfaceGroup::getView("edit_text"));
|
|
|
|
|
|
|
|
|
|
if(_ViewText == NULL)
|
|
|
|
|
createViewText();
|
|
|
|
|
|
|
|
|
|
_ViewText->setEditorSelectable( false );
|
|
|
|
|
|
|
|
|
|
// For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens)
|
|
|
|
|