void MapperGui::valueChanged(const gcn::SelectionEvent& event){ //if event from drop down if( event.getSource() == tilesetBox->getTilesetDropDown() ){ //change the info source for tilset info box tilesetDetailsBox->setInfoSource( tilesetBox->getSelectedTileset() ); } }
void WindowMenu::valueChanged(const gcn::SelectionEvent &event) { if (event.getSource() == mEmotePopup) { int emote = mEmotePopup->getSelectedEmote(); if (emote) Net::getPlayerHandler()->emote(emote); windowContainer->scheduleDelete(mEmotePopup); mEmotePopup = 0; } }
void TradeWindow::valueChanged(const gcn::SelectionEvent &event) { const Item *item; /* If an item is selected in one container, make sure no item is selected * in the other container. */ if (event.getSource() == mMyItemContainer && (item = mMyItemContainer->getSelectedItem())) mPartnerItemContainer->selectNone(); else if ((item = mPartnerItemContainer->getSelectedItem())) mMyItemContainer->selectNone(); }
void InventoryWindow::valueChanged(const gcn::SelectionEvent &event) { if (event.getSource() == mItems) { Item *item = mItems->getSelectedItem(); item ? itemShortcut->setSelected(item->getId()) : itemShortcut->setSelected(-1); updateButtons(); distributeValueChangedEvent(); } }
void MapperTilesetBox::valueChanged(const gcn::SelectionEvent& event){ //if event from drop down if( event.getSource() == tilesetDropDown ){ Tileset *newTileset = tilesetList->at( tilesetDropDown->getSelected() ); selectedTile.setTileset( newTileset ); if( tilesetList->at( tilesetDropDown->getSelected() ) != attribTs ){ selectedTile.setAttribute( MapTile::REGULAR ); } else { selectedTile.setAttribute( attribGrid[0][0] ); } setTilesetPreview( newTileset ); } }
void FileDialog::valueChanged(const gcn::SelectionEvent& se) { gcn::Widget *src = se.getSource(); if(src == lbFiles) { if(IsFileSelected()) tbFilename->setText(getElementAt(lbFiles->getSelected())); else tbFilename->setText(""); // do not put directory name in text field if directory selected // TODO: update preview, once implemented } }
void TradeWindow::valueChanged(const gcn::SelectionEvent &event) { if (!mMyItemContainer || !mPartnerItemContainer) return; /* If an item is selected in one container, make sure no item is selected * in the other container. */ if (event.getSource() == mMyItemContainer && mMyItemContainer->getSelectedItem()) { mPartnerItemContainer->selectNone(); } else if (mPartnerItemContainer->getSelectedItem()) { mMyItemContainer->selectNone(); } }
void EquipmentWindow::valueChanged(const gcn::SelectionEvent &event) { if (event.getSource() == mItems) updateButtons(); }
void StorageWindow::valueChanged(const gcn::SelectionEvent &event) { if (event.getSource() == mItems) mRetrieveButton->setEnabled(mItems->getSelectedItem() != 0); }