void SceneEditorScreenMain::Input(DAVA::UIEvent *event) { if(UIEvent::PHASE_KEYCHAR == event->phase) { if(IsKeyModificatorPressed(DVKEY_ALT)) { int32 key = event->tid - DVKEY_1; if(0 <= key && key < 8) { BodyItem *iBody = FindCurrentBody(); Entity *node = iBody->bodyControl->GetSelectedSGNode(); EditorScene *editorScene = iBody->bodyControl->GetScene(); editorScene->SetForceLodLayer(node, key); } else if(DVKEY_0 == event->tid) { EditorSettings::Instance()->Save(); } } //ckecking help UITextField *tf = dynamic_cast<UITextField *>(UIControlSystem::Instance()->GetFocusedControl()); UITextField *tf1 = dynamic_cast<UITextField *>(focusedControl); if(!tf && !tf1) { if((DVKEY_F1 == event->tid) || (DVKEY_H == event->tid)) { if(helpDialog->GetParent()) { helpDialog->Close(); } else { helpDialog->Show(); } } if(DVKEY_ESCAPE == event->tid) { if(materialEditor && materialEditor->GetParent()) { MaterialsTriggered(); } } } } }
void SceneEditorScreenMain::OnMaterialsPressed(BaseObject *, void *, void *) { MaterialsTriggered(); }