当前位置: 首页>>代码示例>>C++>>正文


C++ UI_WINDOW::destroy方法代码示例

本文整理汇总了C++中UI_WINDOW::destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ UI_WINDOW::destroy方法的具体用法?C++ UI_WINDOW::destroy怎么用?C++ UI_WINDOW::destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI_WINDOW的用法示例。


在下文中一共展示了UI_WINDOW::destroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: loop_brief_close

// close
void loop_brief_close()
{
	// this makes sure that we're all cool no matter how the user decides to exit
	mission_campaign_mission_over();

	// free the bitmap
	if (Loop_brief_bitmap >= 0){
		bm_release(Loop_brief_bitmap);
	}		
	Loop_brief_bitmap = -1;

	// destroy the window
	Loop_brief_window.destroy();

	if (Loop_anim.num_frames > 0)
	{
		generic_anim_unload(&Loop_anim);
	}

	// stop voice
	if(Loop_sound != -1){
		audiostream_stop(Loop_sound, 1, 0);
		audiostream_close_file(Loop_sound, 1);
		Loop_sound = -1;
	}

	fsspeech_stop();

	// stop music
	common_music_close();
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:32,代码来源:missionloopbrief.cpp

示例2: cutscenes_screen_close

void cutscenes_screen_close()
{
	if (Background_bitmap)
		bm_release(Background_bitmap);

	Ui_window.destroy();
}
开发者ID:n-kawamt,项目名称:fs2open_snapshot,代码行数:7,代码来源:cutscenes.cpp

示例3: popup_close

// called when a popup goes away
void popup_close(popup_info *pi, int screen_id)
{
	int i;
	
	gamesnd_play_iface(SND_POPUP_DISAPPEAR); 	// play sound when popup disappears

	for (i=0; i<pi->nchoices; i++ )	{
		if ( pi->button_text[i] != NULL ) {
			vm_free(pi->button_text[i]);
			pi->button_text[i] = NULL;
		}
	}

	if(screen_id >= 0){
		gr_free_screen(screen_id);	
	}
	Popup_window.destroy();
	anim_ignore_next_frametime();					// to avoid skips in animation since next frametime is saturated
	game_flush();

	Popup_is_active = 0;
	Popup_running_state = 0;

	// anytime in single player, and multiplayer, not in mission, go ahead and stop time
	if ( (Game_mode & GM_NORMAL) || ((Game_mode & GM_MULTIPLAYER) && !(Game_mode & GM_IN_MISSION)) )
		game_start_time();
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:28,代码来源:popup.cpp

示例4: cmd_brief_close

void cmd_brief_close()
{
	int i;

	if (Cmd_brief_inited) {
		cmd_brief_stop_anim();
		generic_anim_unload(&Cur_Anim);
		for (i=0; i<Cur_cmd_brief->num_stages; i++) {
			if (Cur_cmd_brief->stage[i].wave >= 0)
				audiostream_close_file(Cur_cmd_brief->stage[i].wave, 0);

		}

		// so that the same ani will reload properly upon return
		Cur_anim_filename = "~~~~";

		if (Cmd_brief_background_bitmap >= 0)
			bm_release(Cmd_brief_background_bitmap);

		// unload the overlay bitmap
		help_overlay_unload(CMD_BRIEF_OVERLAY);

		Ui_window.destroy();

		game_flush();
		Cmd_brief_inited = 0;
	}

	// Stop any speech from running over
	fsspeech_stop();
}
开发者ID:achilleas-k,项目名称:fs2open.github.com,代码行数:31,代码来源:missioncmdbrief.cpp

示例5: pause_close

// close the pause screen
void pause_close()
{
	// if we're not paused - do nothing
	if ( !Paused ) {
		return;
	}

	Assert( !(Game_mode & GM_MULTIPLAYER) );

	// unpause all weapon sounds
	weapon_unpause_sounds();

	// deinit stuff
	if(Pause_saved_screen != -1) {
		gr_free_screen(Pause_saved_screen);
		Pause_saved_screen = -1;
	}

	if (Pause_background_bitmap != -1){
		bm_release(Pause_background_bitmap);
		Pause_background_bitmap = -1;
	}

	Pause_win.destroy();		
	game_flush();

	// unpause all the music
	audiostream_unpause_all();		

	Paused = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:32,代码来源:missionpause.cpp

示例6: barracks_close

// -----------------------------------------------------------------------------
void barracks_close()
{
	// destroy window
	Ui_window.destroy();

	// release background bitmap
	if (Background_bitmap >= 0) {
		bm_release(Background_bitmap);
	}	

	// release rank pip bitmaps
	bm_release(Rank_pips_bitmaps);	

	// release pilot pic bitmaps
	for (int i=0; i<Num_pilot_images; i++) {
		if (Pilot_images[i] >= 0) {
			bm_release(Pilot_images[i]);
		}
	}

	if(Stat_labels != NULL)
	{
		delete[] Stat_labels;
		Stat_labels = NULL;
	}
	if(Stats != NULL)
	{
		delete[] Stats;
		Stats = NULL;
	}

	game_flush();
}
开发者ID:PhantomHoover,项目名称:fs2open.github.com,代码行数:34,代码来源:barracks.cpp

示例7: chatbox_close

void chatbox_close()
{
	if (!Chatbox_created)
		return;

	// destory the UI window
	Chat_window.destroy();

	// unload any bitmaps
	if (Chatbox_small_bitmap != -1) {
		bm_release(Chatbox_small_bitmap);
		Chatbox_small_bitmap = -1;
	}

	if (Chatbox_big_bitmap != -1) {
		bm_release(Chatbox_big_bitmap);
		Chatbox_big_bitmap = -1;
	}

	if (Chatbox_mp_bitmap != -1) {
		bm_release(Chatbox_mp_bitmap);
		Chatbox_mp_bitmap = -1;
	}	

	// clear all the text lines in the
	chatbox_clear();
	Chatbox_created = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:28,代码来源:chatbox.cpp

示例8: fiction_viewer_close

// close
void fiction_viewer_close()
{
	if (!Fiction_viewer_inited)
		return;
	
	// free the fiction
	fiction_viewer_reset();

	// destroy the window
	Fiction_viewer_window.destroy();

	// restore the old font
	use_std_font();

	// free the bitmap
	if (Fiction_viewer_bitmap >= 0)
		bm_release(Fiction_viewer_bitmap);
	Fiction_viewer_bitmap = -1;

	// maybe stop music
	if (Mission_music[SCORE_FICTION_VIEWER] != Mission_music[SCORE_BRIEFING])
		common_music_close();
	
	game_flush();

	Fiction_viewer_inited = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:28,代码来源:fictionviewer.cpp

示例9: mht_close

void mht_close()
{
	// unload any bitmaps
	if(!bm_unload(Mht_bitmap)){
		nprintf(("General","WARNING : could not unload background bitmap %s\n", Mht_bitmap_fname[gr_screen.res]));
	}	
	
	// destroy the UI_WINDOW
	Mht_window.destroy();
}
开发者ID:Kobrar,项目名称:fs2open.github.com,代码行数:10,代码来源:mainhalltemp.cpp

示例10: gameplay_help_close

// called once when leaving the gameplay help state
void gameplay_help_close()
{
	if ( Gameplay_help_inited ) {
		if (Background_bitmap >= 0) {
			bm_release(Background_bitmap);
		}

		Ui_window.destroy();
		common_free_interface_palette();		// restore game palette
		game_flush();
	}

	Gameplay_help_inited = 0;
}
开发者ID:VRDate,项目名称:fs2open.github.com,代码行数:15,代码来源:gameplayhelp.cpp

示例11: popupdead_close

// Close down the dead popup
void popupdead_close()
{
	if ( !Popupdead_active ) {
		return;
	}

	gamesnd_play_iface(SND_POPUP_DISAPPEAR);
	Popupdead_window.destroy();
	game_flush();

	Popupdead_active = 0;
	Popupdead_skip_active = 0;
	Popupdead_skip_already_shown = 0;
}
开发者ID:n-kawamt,项目名称:fs2open_snapshot,代码行数:15,代码来源:popupdead.cpp

示例12: pilot_manage_close

void pilot_manage_close(void)
{
	// destroy window
	Ui_window.destroy();

	// release background bitmap
	if (Background_bitmap >= 0) {
		bm_unload(Background_bitmap);
	}

	// unload the overlay bitmap
// fix it	help_overlay_unload(PILOT_MANAGE_OVERLAY);

	game_flush();
}
开发者ID:chief1983,项目名称:Imperial-Alliance,代码行数:15,代码来源:pilotmanage.cpp

示例13: credits_close

void credits_close()
{	
	int i;

	/*
	if (CreditsWin01 != -1){
		bm_unload(CreditsWin01);
		CreditsWin01 = -1;
	}
	if (CreditsWin02 != -1){
		bm_unload(CreditsWin02);
		CreditsWin02 = -1;
	}
	if (CreditsWin03 != -1){
		bm_unload(CreditsWin03);
		CreditsWin03 = -1;
	}
	if (CreditsWin04 != -1){
		bm_unload(CreditsWin04);
		CreditsWin04 = -1;
	}
	*/

	for (i=0; i<NUM_IMAGES; i++){
		if (Credits_bmps[i] >= 0){
			bm_release(Credits_bmps[i]);
			Credits_bmps[i] = -1;
		}
	}	

	credits_stop_music();

	if (Credit_text) {
		if (Credit_text_malloced){
			vm_free(Credit_text);
		}

		Credit_text = NULL;
	}

	if (Background_bitmap){
		bm_release(Background_bitmap);
	}

	Ui_window.destroy();
	common_free_interface_palette();		// restore game palette
}
开发者ID:svn2github,项目名称:FS2Open_Trunk,代码行数:47,代码来源:credits.cpp

示例14: mission_hotkey_close

// ---------------------------------------------------------------------
// mission_hotkey_close()
//
// Cleanup the hotkey assignment screen system.  Called when GS_STATE_HOTKEY_SCREEN
// is left.
//
void mission_hotkey_close()
{
	if (Background_bitmap)
		bm_release(Background_bitmap);
	if (Wing_bmp >= 0)
		bm_release(Wing_bmp);

	// unpause all weapon sounds
	weapon_unpause_sounds();

	// unpause all game music
	audiostream_unpause_all();

	Ui_window.destroy();
	common_free_interface_palette();		// restore game palette
	game_flush();
}
开发者ID:PhantomHoover,项目名称:fs2open.github.com,代码行数:23,代码来源:missionhotkey.cpp

示例15: techroom_close

void techroom_close()
{
	fsspeech_stop();

	techroom_lists_reset();

	Techroom_show_all = 0;

	if (Tech_background_bitmap) {
		bm_release(Tech_background_bitmap);
	}

	Ui_window.destroy();
	common_free_interface_palette();		// restore game palette
	if (Palette_bmp){
		bm_release(Palette_bmp);
	}
}
开发者ID:RandomTiger,项目名称:fs2open.github.com,代码行数:18,代码来源:techmenu.cpp


注:本文中的UI_WINDOW::destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。