}
return 0;
}
-
+/*
struct LightRadii {
static void Export(const EntityCreator &self, const Callback<void(bool)> &returnz) {
returnz(self.getLightRadii());
void Entity_registerPreferencesPage(){
PreferencesDialog_addDisplayPage( makeCallbackF(Entity_constructPage) );
}
+*/
-
+void ShowLightRadiiExport( const BoolImportCallback& importer ){
+ importer( GlobalEntityCreator().getLightRadii() );
+}
+typedef FreeCaller1<const BoolImportCallback&, ShowLightRadiiExport> ShowLightRadiiExportCaller;
+ShowLightRadiiExportCaller g_show_lightradii_caller;
+ToggleItem g_show_lightradii_item( g_show_lightradii_caller );
+void ToggleShowLightRadii(){
+ GlobalEntityCreator().setLightRadii( !GlobalEntityCreator().getLightRadii() );
+ g_show_lightradii_item.update();
+ UpdateAllWindows();
+}
void Entity_constructMenu( ui::Menu menu ){
create_menu_item_with_mnemonic( menu, "_Regroup", "GroupSelection" );
create_menu_item_with_mnemonic( menu, "_Ungroup", "UngroupSelection" );
GlobalCommands_insert( "GroupSelection", makeCallbackF(Entity_groupSelected) );
GlobalCommands_insert( "UngroupSelection", makeCallbackF(Entity_ungroupSelected) );
+ GlobalToggles_insert( "ShowLightRadiuses", FreeCaller<ToggleShowLightRadii>(), ToggleItem::AddCallbackCaller( g_show_lightradii_item ) );
+
GlobalPreferenceSystem().registerPreference( "SI_Colors5", make_property_string( g_entity_globals.color_entity ) );
GlobalPreferenceSystem().registerPreference( "LastLightIntensity", make_property_string( g_iLastLightIntensity ) );
- Entity_registerPreferencesPage();
+// Entity_registerPreferencesPage();
}
void Entity_Destroy(){