代码拉取完成,页面将自动刷新
// DialogSystem.cpp : 实现文件
//
#include "stdafx.h"
#include "TurboMir.h"
#include "GameMir.h"
#include "PageSystem.h"
#include ".\pagesystem.h"
// CPageSystem 对话框
IMPLEMENT_DYNAMIC(CPageSystem, CPageBase)
CPageSystem::CPageSystem( CGameMir& game, CWnd* pParent /*= NULL*/ )
: CPageBase(CPageSystem::IDD, pParent)
, m_Game(game)
{
}
CPageSystem::~CPageSystem()
{
}
void CPageSystem::DoDataExchange(CDataExchange* pDX)
{
CPageBase::DoDataExchange(pDX);
DDX_Control(pDX, IDC_SMART_ACC, m_SmartAcc);
DDX_Control(pDX, IDC_MOVE_SPEED, m_MoveSpeed);
DDX_Control(pDX, IDC_ATTACK_SPEED, m_AttackSpeed);
DDX_Control(pDX, IDC_MOVE_SPEED_TEXT, m_MoveSpeedLabel);
DDX_Control(pDX, IDC_ATTACK_SPEED_TEXT, m_AttackSpeedLabel);
DDX_Control(pDX, IDC_SHOW_MINI_MAP, m_ShowMiniMap);
}
BEGIN_MESSAGE_MAP(CPageSystem, CPageBase)
ON_BN_CLICKED(IDC_SMART_ACC, OnBnClickedSmartAcc)
ON_WM_HSCROLL()
ON_BN_CLICKED(IDC_SHOW_MINI_MAP, OnBnClickedShowMiniMap)
END_MESSAGE_MAP()
// CPageSystem 消息处理程序
void CPageSystem::OnBnClickedSmartAcc()
{
if( Updating ) return;
m_Game.m_SettingMgr.SmartAccelerate=(m_SmartAcc.GetCheck()==BST_CHECKED);
m_Game.m_SettingMgr.Save();
}
void CPageSystem::UpdateSets()
{
Updating=true;
if ( m_Game.m_SettingMgr.SmartAccelerate )
m_SmartAcc.SetCheck(BST_CHECKED);
else
m_SmartAcc.SetCheck(BST_UNCHECKED);
if ( m_Game.m_SettingMgr.ShowMiniMap )
m_ShowMiniMap.SetCheck(BST_CHECKED);
else
m_ShowMiniMap.SetCheck(BST_UNCHECKED);
m_AttackSpeed.SetRange(10,2000);
m_MoveSpeed.SetRange(10,2000);
m_AttackSpeed.SetPos(m_Game.m_SettingMgr.AttackSpeed);
m_MoveSpeed.SetPos(m_Game.m_SettingMgr.MoveSpeed);
char strBuf[32];
sprintf(strBuf,"%d",m_Game.m_SettingMgr.AttackSpeed);
m_AttackSpeedLabel.SetWindowText(strBuf);
sprintf(strBuf,"%d",m_Game.m_SettingMgr.MoveSpeed);
m_MoveSpeedLabel.SetWindowText(strBuf);
Updating=false;
}
void CPageSystem::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CPageBase::OnHScroll(nSBCode, nPos, pScrollBar);
if( Updating ) return;
char strBuf[32];
m_Game.m_SettingMgr.AttackSpeed=m_AttackSpeed.GetPos();
m_Game.m_SettingMgr.MoveSpeed=m_MoveSpeed.GetPos();
sprintf(strBuf,"%d",m_Game.m_SettingMgr.AttackSpeed);
m_AttackSpeedLabel.SetWindowText(strBuf);
sprintf(strBuf,"%d",m_Game.m_SettingMgr.MoveSpeed);
m_MoveSpeedLabel.SetWindowText(strBuf);
m_Game.m_SettingMgr.Save();
}
void CPageSystem::OnBnClickedShowMiniMap()
{
if( Updating ) return;
m_Game.m_SettingMgr.ShowMiniMap=(m_ShowMiniMap.GetCheck()==BST_CHECKED);
m_Game.m_SettingMgr.Save();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。