void CCreateLightNodeWindow::OnDoubleClickListItem() { int itemIndex = ListBox_GetCurSel(mLightNodesList); if (itemIndex != LB_ERR) { u32 id = ListBox_GetItemData(mLightNodesList, itemIndex); EditorScene* scene = EditorScene::getInstance(); EditorWindow* window = EditorWindow::getInstance(); if (scene->SelectLight(id)) { scene->FocusSelectedLight(); window->ShowNodeInfo(id); } SetFocus(mParentHwnd); } }
void CLightPanel::MouseDoubleClicked(int sx, int sy) { EditorScene* scene = EditorScene::getInstance(); EditorWindow* window = EditorWindow::getInstance(); if (!scene) return; E_MOUSE_STATE mouseState = window->GetMouseState(); if (mouseState == EMS_PICKING) { int id = scene->SelectLight(sx, sy); if (id != -1) { scene->FocusSelectedLight(); mCreateLightNodeWindow.SelectListItem(id); } } }