示例#1
0
void CPointerAction::ReadProfileData(wxConfigBase* pConfObj)
{
	long val;
	bool valb;

	pConfObj->SetPath (_T("pointerAction"));

	if (pConfObj->Read(_T("xSpeed"), &val))	SetXSpeed(val);
	if (pConfObj->Read(_T("ySpeed"), &val))	SetYSpeed(val);
	if (pConfObj->Read(_T("acceleration"), &val)) SetAcceleration(val);
	if (pConfObj->Read(_T("smoothness"), &val)) SetSmoothness(val);
	if (pConfObj->Read(_T("easyStop"), &val)) SetEasyStopValue(val);
	if (pConfObj->Read(_T("enabledWorkspace"), &valb)) SetRestrictedWorkingArea(valb);
	if (pConfObj->Read(_T("enabledWrapPointer"), &valb)) SetWrapPointer(valb);
	if (pConfObj->Read(_T("topWorkspace"), &val)) SetTopWorkspace(val);
	if (pConfObj->Read(_T("leftWorkspace"), &val)) SetLeftWorkspace(val);
	if (pConfObj->Read(_T("rightWorkspace"), &val)) SetRightWorkspace(val);
	if (pConfObj->Read(_T("bottomWorkspace"), &val)) SetBottomWorkspace(val);
	if (pConfObj->Read(_T("clickMode"), &val)) SetClickMode((CPointerAction::EClickMode) val);
	pConfObj->Read(_T("beepOnClick"), &m_beepOnClick);	

	m_pDwellClick->ReadProfileData(pConfObj);
	m_pGestureClick->ReadProfileData(pConfObj);

	pConfObj->SetPath (_T(".."));
}
示例#2
0
//MOVE BUBBLEAF
void Bubbleaf::ApplyMovement(const int ticks, const std::vector<double>& sine) noexcept
{
    SetXSpeed(GetXSpeed() * 0.98);

    int phase = floor( (1.25*ticks) + Randomize() );
    SetYSpeed( 0.11 * sine[phase%512] );

    SetX( GetX()+GetXSpeed() );
    SetY( GetY()+GetYSpeed() );
}
示例#3
0
// Configuration methods
void CPointerAction::InitDefaults()
{
	// General attributes
	SetXSpeed (12);
	SetYSpeed (10);
	SetAcceleration (2);
	SetClickMode (CPointerAction::DWELL);
	SetBeepOnClick (true);
	SetSmoothness (4);
	SetEasyStopValue (1); 
	SetWrapPointer(false);
	
	// Workspace limits
	SetRestrictedWorkingArea (false);
	SetTopWorkspace(1);
	SetLeftWorkspace(1);
	SetRightWorkspace(1);
	SetBottomWorkspace(1);
}