mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Connected the oriented combobox and now saving it's value to the tilebank.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
95b67026bf
commit
ddc7961e9b
5 changed files with 25 additions and 0 deletions
|
@ -162,6 +162,8 @@ TileEditorMainWindow::TileEditorMainWindow(QWidget *parent)
|
|||
|
||||
connect( m_ui->actionSaveTileBank, SIGNAL( triggered() ), this, SLOT( save() ) );
|
||||
connect( m_ui->actionSaveTileBankAs, SIGNAL( triggered() ), this, SLOT( saveAs() ) );
|
||||
|
||||
connect( m_ui->orientedCheckBox, SIGNAL( stateChanged( int ) ), this, SLOT( onOrientedStateChanged( int ) ) );
|
||||
}
|
||||
|
||||
TileEditorMainWindow::~TileEditorMainWindow()
|
||||
|
@ -556,6 +558,20 @@ void TileEditorMainWindow::onChooseTexturePath()
|
|||
m_ui->tileBankTexturePathPB->setText( path );
|
||||
}
|
||||
|
||||
void TileEditorMainWindow::onOrientedStateChanged( int state )
|
||||
{
|
||||
QModelIndex idx = m_ui->tileSetLV->currentIndex();
|
||||
if( !idx.isValid() )
|
||||
return;
|
||||
|
||||
TileSetNode *node = reinterpret_cast< TileSetNode* >( idx.internalPointer() );
|
||||
|
||||
if( state == Qt::Checked )
|
||||
node->setOriented( true );
|
||||
else
|
||||
node->setOriented( false );
|
||||
}
|
||||
|
||||
void TileEditorMainWindow::onActionAddTile(int tabId)
|
||||
{
|
||||
QModelIndex idx = m_ui->tileSetLV->currentIndex();
|
||||
|
|
|
@ -69,6 +69,8 @@ private Q_SLOTS:
|
|||
|
||||
void onChooseTexturePath();
|
||||
|
||||
void onOrientedStateChanged( int state );
|
||||
|
||||
void changeActiveTileSet(const QModelIndex &newIndex, const QModelIndex &oldIndex);
|
||||
void onZoomFactor(int level);
|
||||
|
||||
|
|
|
@ -167,6 +167,7 @@ void Node::swapRows( int a, int b )
|
|||
TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tileSetName)
|
||||
{
|
||||
m_parentItem = parent;
|
||||
m_oriented = false;
|
||||
}
|
||||
|
||||
TileSetNode::~TileSetNode()
|
||||
|
|
|
@ -75,9 +75,13 @@ public:
|
|||
void setVegetSet( const QString &s ){ m_vegetSet = s; }
|
||||
QString vegetSet() const{ return m_vegetSet; }
|
||||
|
||||
bool isOriented() const{ return m_oriented; }
|
||||
void setOriented( bool b ){ m_oriented = b; }
|
||||
|
||||
private:
|
||||
QString m_tileSetName;
|
||||
QString m_vegetSet;
|
||||
bool m_oriented;
|
||||
};
|
||||
|
||||
class TileTypeNode : public Node
|
||||
|
|
|
@ -187,6 +187,8 @@ public:
|
|||
addTilesToSet( set, n );
|
||||
setupTransitionTiles( set, n );
|
||||
setupDisplacementTiles( set, n );
|
||||
|
||||
set->setOriented( n->isOriented() );
|
||||
}
|
||||
|
||||
// Add tilesets to lands
|
||||
|
|
Loading…
Reference in a new issue