Пример #1
0
void GUIHandler::BringToFront( int controlid )
{
	Control *control = GetControl( controlid );

	if ( control )
	{
		z_root.erase( control->GetZ() );
		z_root.insert( std::make_pair( (Uint32) zcounter, control ) );
		control->SetZ( zcounter );
		zcounter++;
	}
}
Пример #2
0
void GUIHandler::CloseWindow( int controlid )
{
	Control *control = GetControl( controlid );
	if ( control )
	{
		control->DoOnClose();
		control_root.erase( controlid );
		z_root.erase( control->GetZ() );
		// NOTE: Do _NOT_ try to delete control since we did not alocate memory for it.
	}
	if ( controlid == focusid )
	{
		focusid = 0;
		if ( default_focusid )
		{
			SetFocus( default_focusid );
		}
	}
}