예제 #1
0
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() );
    }
}
예제 #2
0
파일: windowmenu.cpp 프로젝트: Ablu/mana
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;
    }
}
예제 #3
0
파일: trade.cpp 프로젝트: kai62656/manabot
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();
}
예제 #4
0
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();
    }
}
예제 #5
0
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 );
    }
}
예제 #6
0
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
    }
}
예제 #7
0
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();
    }
}
예제 #8
0
void EquipmentWindow::valueChanged(const gcn::SelectionEvent &event)
{
    if (event.getSource() == mItems)
        updateButtons();
}
예제 #9
0
void StorageWindow::valueChanged(const gcn::SelectionEvent &event)
{
    if (event.getSource() == mItems)
        mRetrieveButton->setEnabled(mItems->getSelectedItem() != 0);
}