コード例 #1
0
ファイル: ufoai_gtk.cpp プロジェクト: Garux/netradiant-custom
virtual void activate() const {
	switch ( mIndex )
	{
	case 0: filter_level( CONTENTS_LEVEL1 ); break;
	case 1: filter_level( CONTENTS_LEVEL2 ); break;
	case 2: filter_level( CONTENTS_LEVEL3 ); break;
	case 3: filter_level( CONTENTS_LEVEL4 ); break;
	case 4: filter_level( CONTENTS_LEVEL5 ); break;
	case 5: filter_level( CONTENTS_LEVEL6 ); break;
	case 6: filter_level( CONTENTS_LEVEL7 ); break;
	case 7: filter_level( CONTENTS_LEVEL8 ); break;
	case 8: filter_stepon(); break;
	case 9: filter_actorclip(); break;
	case 10: filter_weaponclip(); break;
	case 11: filter_nodraw(); break;
	}
	SceneChangeNotify();
}
コード例 #2
0
ファイル: ufoai.cpp プロジェクト: xonotic/netradient
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){
	char const *message = NULL;
	if ( string_equal( command, "About" ) ) {
		char const *version_string = "UFO:AI Plugin (http://ufoai.sf.net)\nBuild: " __DATE__
			"\nRadiant version: " RADIANT_VERSION
			"\nPlugin version: " PLUGIN_VERSION
			"\nAuthor: Martin Gerhardy (tlh2000/mattn)\n";
		GlobalRadiant().m_pfnMessageBox( g_mainwnd,
										 version_string, "About",
										 eMB_OK, eMB_ICONDEFAULT );
	}
	else if ( string_equal( command, "Level 1" ) ) {
		filter_level( CONTENTS_LEVEL1 );
	}
	else if ( string_equal( command, "Level 2" ) ) {
		filter_level( CONTENTS_LEVEL2 );
	}
	else if ( string_equal( command, "Level 3" ) ) {
		filter_level( CONTENTS_LEVEL3 );
	}
	else if ( string_equal( command, "Worldspawn" ) ) {
		assign_default_values_to_worldspawn( false, &message );
	}
	else if ( string_equal( command, "Worldspawn reset" ) ) {
		assign_default_values_to_worldspawn( true, &message );
	}
	else if ( string_equal( command, "Perform check" ) ) {
		check_map_values( &message );
	}
	else if ( string_equal( command, "Level 4" ) ) {
		filter_level( CONTENTS_LEVEL4 );
	}
	else if ( string_equal( command, "Level 5" ) ) {
		filter_level( CONTENTS_LEVEL5 );
	}
	else if ( string_equal( command, "Level 6" ) ) {
		filter_level( CONTENTS_LEVEL6 );
	}
	else if ( string_equal( command, "Level 7" ) ) {
		filter_level( CONTENTS_LEVEL7 );
	}
	else if ( string_equal( command, "Level 8" ) ) {
		filter_level( CONTENTS_LEVEL8 );
	}
	else if ( string_equal( command, "StepOn" ) ) {
		filter_stepon();
	}
	else if ( string_equal( command, "ActorClip" ) ) {
		filter_actorclip();
	}
	else if ( string_equal( command, "WeaponClip" ) ) {
		filter_weaponclip();
	}
	else if ( string_equal( command, "NoDraw" ) ) {
		filter_nodraw();
	}

	if ( message != NULL ) {
		GlobalRadiant().m_pfnMessageBox( g_mainwnd,
										 message, "Note",
										 eMB_OK, eMB_ICONDEFAULT );
	}
	SceneChangeNotify();
}