Exemple #1
0
void GfxGLWindowGLUI::Imp::addControl( GLUI_Control* control, ControlID id )
{
    DGFX_ASSERT( control != 0 );
    if ( id != GfxGLWindowGLUI::CTRL_NONE ) {
        DGFX_ASSERT( _controlMap.find( id ) == _controlMap.end() );
        _controlMap[ id ] = ControlPtr( control );
    }
    else {
        _controlList.push_back( ControlPtr( control ) );
    }
}
Exemple #2
0
Device::ControlPtr Device::getControl(const Control::Name& name){
	for (auto& control : controls){
		if (control->getName() == name)
			return ControlPtr(control);
	}
	throw global::Exception("ui::hid::Device::getControl(..): Control not found: %s", name.cStr());
}