void ShowTargetNamesImport( EntityCreator& self, bool value ){ const bool oldvalue = self.getShowTargetNames(); self.setShowTargetNames( value ); if( oldvalue != value ){ PreferencesDialog_restartRequired( "Entity Names = Targetnames" ); } }
int mainML() { sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); MotionControlSystem motionControlSystem; EntityManager entityManager(new FamilyManager()); EntityCreator entityCreator; //Starship erstellen entityManager.addEntity(entityCreator.createStarship()); //Darzustellende Objekte registrieren while (window.isOpen()) { sf::Event event1; while(window.pollEvent(event1)) { if(event1.type == sf::Event::KeyPressed) { motionControlSystem.update(); } } } return 0; }
static NodeSmartReference Entity_create (EntityCreator& entityTable, EntityClass* entityClass, const KeyValues& keyValues) { scene::Node& entity(entityTable.createEntity(entityClass)); for (KeyValues::const_iterator i = keyValues.begin(); i != keyValues.end(); ++i) { Node_getEntity(entity)->setKeyValue((*i).first, (*i).second); } return NodeSmartReference(entity); }
void LightRadiiExport(EntityCreator& self, const BoolImportCallback& importer) { importer(self.getLightRadii()); }
void LightRadiiImport(EntityCreator& self, bool value) { self.setLightRadii(value); }
static void Export(const EntityCreator &self, const Callback<void(bool)> &returnz) { returnz(self.getLightRadii()); }
void ShowTargetNamesExport( EntityCreator& self, const BoolImportCallback& importer ){ importer( self.getShowTargetNames() ); }
void ShowNamesRatioExport( EntityCreator& self, const IntImportCallback& importer ){ importer( self.getShowNamesRatio() ); }
void ShowNamesRatioImport( EntityCreator& self, int value ){ self.setShowNamesRatio( value ); UpdateAllWindows(); }