// --------------------------------------------------
void title_select(do_action_t da)
{
	if (gdmgr._da == da) {
		return;
	}

	if (gdmgr._da == da_sync) {
		sync_hide_ui();
	} else if (gdmgr._da == da_wgen) {
#ifndef _ROSE_EDITOR
		wgen_hide_ui();
#endif
	} else if (gdmgr._da == da_core) {
		if (!core_hide_ui()) {
			return;
		}
	} else if (gdmgr._da == da_visual) {
		visual_hide_ui();
	} else if (gdmgr._da == da_campaign) {
#ifndef _ROSE_EDITOR
		if (!campaign_hide_ui()) {
			return;
		}
#endif
	} else if (gdmgr._da == da_integrate) {
		if (!integrate_hide_ui()) {
			return;
		}
	}
	
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_SYNC, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_WGEN, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_CORE, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_PLAY, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_TBOX, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_BUILDER, 0);

	ShowWindow(gdmgr._hdlg_sync, SW_HIDE);
	ShowWindow(gdmgr._hdlg_wgen, SW_HIDE);
	ShowWindow(gdmgr._hdlg_core, SW_HIDE);
	ShowWindow(gdmgr._hdlg_visual, SW_HIDE);
	ShowWindow(gdmgr._hdlg_campaign, SW_HIDE);
	ShowWindow(gdmgr._hdlg_integrate, SW_HIDE);

	// 记住当前正在执行的会话
	gdmgr._da = da;

	if (da == da_sync) {
		ShowWindow(gdmgr._hdlg_sync, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_SYNC, 1);
		sync_enter_ui();
	
	} else if (da == da_wgen) {
		ShowWindow(gdmgr._hdlg_wgen, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_WGEN, 1);
#ifndef _ROSE_EDITOR
		wgen_enter_ui();
#endif

	} else if (da == da_core) {
		ShowWindow(gdmgr._hdlg_core, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_CORE, 1);
		core_enter_ui();

	} else if (da == da_visual) {
		ShowWindow(gdmgr._hdlg_visual, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_PLAY, 1);
		visual_enter_ui();

	} else if (da == da_campaign) {
		ShowWindow(gdmgr._hdlg_campaign, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_TBOX, 1);
#ifndef _ROSE_EDITOR
		campaign_enter_ui();
#endif

	} else if (da == da_integrate) {
		ShowWindow(gdmgr._hdlg_integrate, SW_RESTORE);
		integrate_enter_ui();
	}
	return;
}
Exemple #2
0
// --------------------------------------------------
void title_select(do_action_t da)
{
	if (gdmgr._da == da) {
		// 当前已正在运行选择的操作,不执行任何动作
		return;
	}

	if (gdmgr._da == da_sync) {
		sync_hide_ui();
	} else if (gdmgr._da == da_wgen) {
		wgen_hide_ui();
	} else if (gdmgr._da == da_core) {
		if (!core_hide_ui()) {
			return;
		}
	} else if (gdmgr._da == da_visual) {
		visual_hide_ui();
	} else if (gdmgr._da == da_campaign) {
		if (!campaign_hide_ui()) {
			return;
		}
	}
	
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_SYNC, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_WGEN, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_XCHG, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_PLAY, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_TBOX, 0);
	ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_ABOUT, 0);

	ShowWindow(gdmgr._hdlg_sync, SW_HIDE);
	ShowWindow(gdmgr._hdlg_wgen, SW_HIDE);
	ShowWindow(gdmgr._hdlg_core, SW_HIDE);
	ShowWindow(gdmgr._hdlg_visual, SW_HIDE);
	ShowWindow(gdmgr._hdlg_campaign, SW_HIDE);
	ShowWindow(gdmgr._hdlg_about, SW_HIDE);

	// 记住当前正在执行的会话
	gdmgr._da = da;

	if (da == da_sync) {
		ShowWindow(gdmgr._hdlg_sync, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_SYNC, 1);
		sync_enter_ui();
	
	} else if (da == da_wgen) {
		ShowWindow(gdmgr._hdlg_wgen, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_WGEN, 1);
		wgen_enter_ui();

	} else if (da == da_core) {
		ShowWindow(gdmgr._hdlg_core, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_XCHG, 1);
		core_enter_ui();

	} else if (da == da_visual) {
		ShowWindow(gdmgr._hdlg_visual, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_PLAY, 1);
		visual_enter_ui();

	} else if (da == da_campaign) {
		ShowWindow(gdmgr._hdlg_campaign, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_TBOX, 1);
		campaign_enter_ui();

	} else if (da == da_about) {
		ShowWindow(gdmgr._hdlg_about, SW_RESTORE);
		ToolBar_CheckButton(gdmgr._htb_sys, IDM_SYS_ABOUT, 1);

	}
	return;
}