bool MapLevel::ProcessLeftDown(Point p, dword keyflags) { p = SceneToView(p); DUMP(IsEditMode()); if (IsEditMode()) _currPoint = GetEditPointIndex(p); if (!_highQuality) NoAA(); // StatesOff(STATE_SELECTED); for (int i = 0; i < _layers.GetCount(); ++i) if (_layers[i] && _layers[i]->IsShown()) { if (_layers[i]->ProcessLeftDown(p, keyflags)) { Refresh(); return true; } } bool r = IMapRender::ProcessLeftDown(p, keyflags); if (r) Refresh(); return r; }
bool MapLevel::ProcessMouseMove(Point p, dword keyflags) { p = SceneToView(p); if (IsEditMode()) { _editModePos = p; if (_currPoint != -1) { SetEditPoint(_currPoint, p); Refresh(); return true; } } for (int i = 0; i < _layers.GetCount(); ++i) if (_layers[i] && _layers[i]->IsShown()) { if (_layers[i]->ProcessMouseMove(p, keyflags)) { Refresh(); return true; } } bool r = IMapRender::ProcessMouseMove(p, keyflags); if (r) Refresh(); return r; }
bool MapLevel::ProcessRightDown(Point p, dword keyflags) { p = SceneToView(p); if (IsEditMode()) { AddEditPoint(p); WhenChangePoint(); Refresh(); } for (int i = 0; i < _layers.GetCount(); ++i) if (_layers[i] && _layers[i]->IsShown()) { if (_layers[i]->ProcessRightDown(p, keyflags)) { Refresh(); return true; } } bool r = IMapRender::ProcessRightDown(p, keyflags); if (r) Refresh(); return r; }
void Camera::Reset() { // TODO Load settings, make configurable from server static const float CAM_Z = ROConfig()->GetFloat("cam-z"); static const float XROT_START = DegToRad(ROConfig()->GetFloat("cam-xrot")); zDist = CAM_Z; xRot = XROT_START; yRotAuto = 0; if (m_target) { // Face player (or whatever) face on // yRotAuto = m_target->GetDir(); } yRotUser = 0; leftDrag = false; rightDrag = false; midDrag = false; if (IsEditMode()) { camKey = false; } else { camKey = true; } }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CMmGridContainer::HandleItemRemovalL() { GetMmModel()->HandleSuiteEventL( ESuiteItemsRemoved, GetMmModel()->GetSuiteModel() ); ValidateWidgetCurrentItemIndex(); iDrawer->RemoveFloatingItems(); if( IsEditMode() ) { iDrawer->GetAnimator()->SetNextRedrawToWholeScreen(); } CacheWidgetPosition(); iGrid->View()->SetDisableRedraw( ETrue ); //prevention scroll view iGrid->HandleItemRemovalL(); iGrid->View()->SetDisableRedraw( EFalse ); RestoreWidgetPosition(); CacheWidgetPosition(); if ( iCurrentHighlight != iGrid->CurrentItemIndex() ) { iCurrentHighlight = iGrid->CurrentItemIndex(); if( !iCurrentHighlight && !iGrid->Model()->NumberOfItems() ) { iCurrentHighlight = KErrNotFound ; } CHnSuiteModel* suiteModel = GetSuiteModelL(); if ( suiteModel ) { suiteModel->SetSuiteHighlightL( iCurrentHighlight ); } } static_cast<CMmListBoxItemDrawer*>( iGrid->ItemDrawer() )->TrimCacheSize( GetMmModel()->NumberOfItems() ); }
bool Trigger::CreateSceneNode() { if (IsEditMode()) { TriggerNode* tn = new TriggerNode; tn->SetAABB(m_aabb); SetSceneNode(tn); } return true; }
bool CameraControl::OnKeyEvent(const KeyEvent& kb) { // TODO Only alter camera if ALT or some other key is held down // Would like to use ALT like Maya but not getting the ALT/option key from GLUT... if (kb.keyType == AMJU_KEY_CHAR && kb.key == 'c') { if (IsEditMode()) { camKey = kb.keyDown; } return false; } return false; }
bool MapLevel::ProcessLeftUp(Point p, dword keyflags) { p = SceneToView(p); if (IsEditMode()) _currPoint = -1; for (int i = 0; i < _layers.GetCount(); ++i) if (_layers[i] && _layers[i]->IsShown()) { if (_layers[i]->ProcessLeftUp(p, keyflags)) { Refresh(); return true; } } bool r = IMapRender::ProcessLeftUp(p, keyflags); if (!_highQuality) Subpixel(); if (r || !_highQuality) Refresh(); return r; }