// static void LLPreviewGesture::updateLabel(LLScrollListItem* item) { LLGestureStep* step = (LLGestureStep*)item->getUserdata(); LLScrollListCell* cell = item->getColumn(0); LLScrollListText* text_cell = (LLScrollListText*)cell; std::string label = step->getLabel(); text_cell->setText(label); }
LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type ) { // Order of enum EStepType MUST match the library_list element in floater_preview_gesture.xml LLGestureStep* step = NULL; switch( step_type) { case STEP_ANIMATION: step = new LLGestureStepAnimation(); break; case STEP_SOUND: step = new LLGestureStepSound(); break; case STEP_CHAT: step = new LLGestureStepChat(); break; case STEP_WAIT: step = new LLGestureStepWait(); break; default: llerrs << "Unknown step type: " << (S32)step_type << llendl; return NULL; } // Create an enabled item with this step LLSD row; row["columns"][0]["value"] = step->getLabel(); row["columns"][0]["font"] = "SANSSERIF_SMALL"; LLScrollListItem* step_item = mStepList->addElement(row); step_item->setUserdata(step); // And move selection to the list on the right mLibraryList->deselectAllItems(); mStepList->deselectAllItems(); step_item->setSelected(TRUE); return step_item; }