void TextBox::DeleteText( int iStartPos, int iLength ) { UnicodeString str = GetText(); str.erase( iStartPos, iLength ); SetText( str ); if ( m_iCursorPos > iStartPos ) { SetCursorPos( m_iCursorPos - iLength ); } SetCursorEnd( m_iCursorPos ); }
void TextBox::DeleteText( int iStartPos, int iLength ) { #ifndef GWEN_NO_UNICODE UnicodeString str = GetText().GetUnicode(); #else String str = GetText().Get(); #endif str.erase( iStartPos, iLength ); SetText( str ); if ( m_iCursorPos > iStartPos ) { SetCursorPos( m_iCursorPos - iLength ); } SetCursorEnd( m_iCursorPos ); }
void AppGuiBase::Render( Gwen::Skin::Base* skin ) { m_iFrames++; if ( m_fLastSecond < Gwen::Platform::GetTimeInSeconds() ) { Controls::Layout::Table* logTable = logWindow->m_TextOutput->GetTable(); UnicodeString lastStatus; if( logTable->RowCount(0) ) { lastStatus = logTable->GetRow( logTable->RowCount(0)-1 )->GetText(0).GetUnicode(); lastStatus.erase(lastStatus.size()-1); } m_StatusBar->SetText( lastStatus + Gwen::Utility::Format( L" - %i fps", /*m_iFrames * 2 */ (int)ofGetFrameRate() ) ); m_fLastSecond = Gwen::Platform::GetTimeInSeconds() + 0.5f; m_iFrames = 0; } BaseClass::Render( skin ); }