Example #1
0
//系统设置
void CGameFrame::ShowSystemOption()
{
	//获取参数
	CGameOption * pGameOption=NULL;
	CServerOption * pServerOption=NULL;
	if (m_pActiveViewItem!=&m_DlgGamePlaza)
	{
		for (int i=0;i<CountArray(m_pRoomViewItem);i++)
		{
			if (m_pRoomViewItem[i]==NULL) break;
			if (m_pActiveViewItem==m_pRoomViewItem[i])
			{
				pGameOption=m_pRoomViewItem[i]->GetGameOption();
				pServerOption=m_pRoomViewItem[i]->GetServerOption();
				break;
			}
		}
	}

	//显示窗口
	CDlgOption DlgOption(pGameOption,pServerOption);
	INT_PTR iResult=DlgOption.DoModal();
	if (iResult==IDOK)
	{
		for (int i=0;i<CountArray(m_pRoomViewItem);i++)
		{
			if (m_pRoomViewItem[i]==NULL) break;
			m_pRoomViewItem[i]->SendUserRule();
		}
	}

	return;
}
Example #2
0
public func MsgDialogueKing() {
	return [
	DlgOption(0, -1)->Text("Greetings."),
	DlgOption(1, -1, "Test 1")->Text("The icon should have been a {{FLNT}}")->Icon(FLNT),
	DlgOption(2, -1, "Test 2")->Text("Should display the clonk rank symbol")->Icon(CLNK)->MenuExtra(1),
	DlgOption(3, -1, "Test 3")->Text("Should display the mouse cursor axe")->Icon(MCCR)->MenuExtra(2, 3),
	DlgOption(4, -1, "Test 4")->Text("Blub")->NextDialogue(2),
	DlgOption(5, -1, "Test 5")->Text("This was displayed red until you collected a rock")->Conditions("pTarget->FindContents(ROCK)")->RequiredConditions(0),
	DlgOption(6, -1, "Test 6")->Text("This text should be green")->MenuItemColor(RGB(0, 255, 0)),
	DlgOption(7, -1, "Test 7")->Text("This has a new menu caption")->MenuCaption("John the funky king"),
	DlgOption(8, -1, "Test 8")->Text("Cool menu deco")->MenuDeco(HZDC),
	DlgOption(9, -1, "Test 9")->Text("aaaaaaaaa aaaaaaaa aaaaaaaaaaaaaaa aaaaaaaa aaaaaaaaaaa aaaaa aaaaaaaa aaaaaaaa aaaaaaa aaaaaa aaaaaa aaaaaa aaaaaa")->DisplayInstantly(),
	DlgOption(10, -1, "Test 10")->Text("My text has no name displayed")->DisableSpeakerColor(),
	DlgOption(11, -1, "Test 11")->Text("Either the option or the message is blue")->TextColor(RGB(0, 0, 200)),
	DlgOptionCancelAlways()
	];
}