?? ui.cpp
字號:
#include "stdafx.h"
#include "黑白棋對弈.h"
#include "Core.h"
#include "UI.h"
extern CBad *pCore;
extern HWND m_hDlg;
extern bool UpdatePic(HWND m_hDlg,int **p);
bool UI::Clear()
{
pCore->Clear();
return false;
}
bool UI::PushExit()
{
pCore->Exit();
return true;
}
bool UI::PushStart()
{
bool flag=pCore->LoadSuccess();
return flag;
}
bool UI::SelectDllName(string dll,int i)
{
return pCore->SelecetDllName(dll,i);
}
bool UI::SeletFirst(int mark)
{
pCore->iFirst=mark;
pCore->iTurn=mark;
return true;
}
int ** UI::GetChess()
{
return (int **)pCore->iData;
}
void UI::EndResult(string Result)
{
SetDlgItemText(m_hDlg,IDC_STATIC1,&Result[0]);
}
void UI::ShowTime(string time)
{
SetDlgItemText(m_hDlg,IDC_TIME,&time[0]);
}
void UI::ShowScore(string score)
{
SetDlgItemText(m_hDlg,IDC_SCORE,&score[0]);
}
void UI::Show(string Result)
{
SetDlgItemText(m_hDlg,IDC_STATIC1,&Result[0]);
}
void UI::ShowName(string name,int n)
{
if(n==1)
SetDlgItemText(m_hDlg,IDC_P1,&name[0]);
if(n==2)
SetDlgItemText(m_hDlg,IDC_P2,&name[0]);
}
void UI:: Begin()
{
pCore->GameBegin();
}
void UI::NewChess()
{
int **p=GetChess();
UpdatePic(m_hDlg,p);
}
void UI::SetTimeLimit(int n)
{
pCore->iTimeLimit=n;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -