/* MapObjectPropsPanel::onShowAllToggled * Called when the 'show all' checkbox is toggled *******************************************************************/ void MapObjectPropsPanel::onShowAllToggled(wxCommandEvent& e) { mobj_props_show_all = cb_show_all->GetValue(); // Refresh each property's visibility for (unsigned a = 0; a < properties.size(); a++) properties[a]->updateVisibility(); updateArgs(NULL); }
/* process the command line */ void procComLine( int *argc, char **argv ) { int i; n = 3; ascii_in = 0; ascii_out = 0; i = *argc - 1 ; while( i > 0 ) { /* handle a request for help */ if( !strcmp( argv[i], "-h" ) || !strcmp( argv[i], "-help" ) ) { printUsage( argv[0] ) ; exit( 1 ) ; } /* specify n */ if( !strcmp( argv[i], "-n" ) ) { n = atoi( argv[i+1] ) ; updateArgs( argc, argv, i+1 ) ; updateArgs( argc, argv, i ) ; } /* input files in ascii */ if( !strcmp( argv[i], "-ascii_input" ) ) { ascii_in = 1; updateArgs( argc, argv, i ) ; } /* input files in ascii */ if( !strcmp( argv[i], "-ascii_output" ) ) { ascii_out = 1; updateArgs( argc, argv, i ) ; } i--; } }
void ProjectBuildArgs::setCompConfig(OovStringRef ownerCompName) { mBuildEnv.addCurrentFilterValue(OptFilterNameComponent, ownerCompName); updateArgs(); }
/* MapObjectPropsPanel::openObject * Populates the grid with properties for all MapObjects in [objects] *******************************************************************/ void MapObjectPropsPanel::openObjects(vector<MapObject*>& objects) { // Check any objects were given if (objects.size() == 0 || objects[0] == NULL) { this->objects.clear(); pg_properties->DisableProperty(pg_properties->GetGrid()->GetRoot()); pg_properties->SetPropertyValueUnspecified(pg_properties->GetGrid()->GetRoot()); pg_properties->Refresh(); pg_props_side1->DisableProperty(pg_props_side1->GetGrid()->GetRoot()); pg_props_side1->SetPropertyValueUnspecified(pg_props_side1->GetGrid()->GetRoot()); pg_props_side1->Refresh(); pg_props_side2->DisableProperty(pg_props_side2->GetGrid()->GetRoot()); pg_props_side2->SetPropertyValueUnspecified(pg_props_side2->GetGrid()->GetRoot()); pg_props_side2->Refresh(); return; } else pg_properties->EnableProperty(pg_properties->GetGrid()->GetRoot()); // Setup property grid for the object type if (theMapEditor->currentMapDesc().format == MAP_UDMF) setupTypeUDMF(objects[0]->getObjType()); else setupType(objects[0]->getObjType()); // Find any custom properties (UDMF only) if (theMapEditor->currentMapDesc().format == MAP_UDMF) { for (unsigned a = 0; a < objects.size(); a++) { // Go through object properties vector<MobjPropertyList::prop_t> objprops = objects[a]->props().allProperties(); for (unsigned b = 0; b < objprops.size(); b++) { // Ignore side property if (objprops[b].name.StartsWith("side1.") || objprops[b].name.StartsWith("side2.")) continue; // Check if hidden if (VECTOR_EXISTS(hide_props, objprops[b].name)) continue; // Check if property is already on the list bool exists = false; for (unsigned c = 0; c < properties.size(); c++) { if (properties[c]->getPropName() == objprops[b].name) { exists = true; break; } } if (!exists) { // Create custom group if needed if (!group_custom) group_custom = pg_properties->Append(new wxPropertyCategory("Custom")); //LOG_MESSAGE(2, "Add custom property \"%s\"", objprops[b].name); // Add property switch (objprops[b].value.getType()) { case PROP_BOOL: addBoolProperty(group_custom, objprops[b].name, objprops[b].name); break; case PROP_INT: addIntProperty(group_custom, objprops[b].name, objprops[b].name); break; case PROP_FLOAT: addFloatProperty(group_custom, objprops[b].name, objprops[b].name); break; default: addStringProperty(group_custom, objprops[b].name, objprops[b].name); break; } } } } } // Generic properties for (unsigned a = 0; a < properties.size(); a++) properties[a]->openObjects(objects); // Handle line sides if (objects[0]->getObjType() == MOBJ_LINE) { // Enable/disable side properties wxPGProperty* prop = pg_properties->GetProperty("sidefront"); if (prop && (prop->IsValueUnspecified() || prop->GetValue().GetInteger() >= 0)) pg_props_side1->EnableProperty(pg_props_side1->GetGrid()->GetRoot()); else { pg_props_side1->DisableProperty(pg_props_side1->GetGrid()->GetRoot()); pg_props_side1->SetPropertyValueUnspecified(pg_props_side1->GetGrid()->GetRoot()); } prop = pg_properties->GetProperty("sideback"); if (prop && (prop->IsValueUnspecified() || prop->GetValue().GetInteger() >= 0)) pg_props_side2->EnableProperty(pg_props_side2->GetGrid()->GetRoot()); else { pg_props_side2->DisableProperty(pg_props_side2->GetGrid()->GetRoot()); pg_props_side2->SetPropertyValueUnspecified(pg_props_side2->GetGrid()->GetRoot()); } } // Update internal objects list if (&objects != &this->objects) { this->objects.clear(); for (unsigned a = 0; a < objects.size(); a++) this->objects.push_back(objects[a]); } // Possibly update the argument names and visibility updateArgs(NULL); pg_properties->Refresh(); pg_props_side1->Refresh(); pg_props_side2->Refresh(); }