Exemple #1
0
void SampleApp::OnLimitCharsToggle() {
	if( m_limit_check->IsActive() ) {
		m_entry->SetMaximumLength( 4 );
	}
	else {
		m_entry->SetMaximumLength( 0 );
	}
}
Exemple #2
0
void ButtonsExample::ButtonCheck() {
	// When the CheckButton is active hide the window's background.
	if( m_check_button->IsActive() ) {
		m_window->SetStyle( m_window->GetStyle() & ~sfg::Window::BACKGROUND );
	}
	else {
		m_window->SetStyle( m_window->GetStyle() | sfg::Window::BACKGROUND );
	}
}