Connected the oriented combobox and now saving it's value to the tilebank.
This commit is contained in:
parent
a513af355d
commit
240844c1cd
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->actionSaveTileBank, SIGNAL( triggered() ), this, SLOT( save() ) );
|
||||||
connect( m_ui->actionSaveTileBankAs, SIGNAL( triggered() ), this, SLOT( saveAs() ) );
|
connect( m_ui->actionSaveTileBankAs, SIGNAL( triggered() ), this, SLOT( saveAs() ) );
|
||||||
|
|
||||||
|
connect( m_ui->orientedCheckBox, SIGNAL( stateChanged( int ) ), this, SLOT( onOrientedStateChanged( int ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEditorMainWindow::~TileEditorMainWindow()
|
TileEditorMainWindow::~TileEditorMainWindow()
|
||||||
|
@ -556,6 +558,20 @@ void TileEditorMainWindow::onChooseTexturePath()
|
||||||
m_ui->tileBankTexturePathPB->setText( path );
|
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)
|
void TileEditorMainWindow::onActionAddTile(int tabId)
|
||||||
{
|
{
|
||||||
QModelIndex idx = m_ui->tileSetLV->currentIndex();
|
QModelIndex idx = m_ui->tileSetLV->currentIndex();
|
||||||
|
|
|
@ -69,6 +69,8 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void onChooseTexturePath();
|
void onChooseTexturePath();
|
||||||
|
|
||||||
|
void onOrientedStateChanged( int state );
|
||||||
|
|
||||||
void changeActiveTileSet(const QModelIndex &newIndex, const QModelIndex &oldIndex);
|
void changeActiveTileSet(const QModelIndex &newIndex, const QModelIndex &oldIndex);
|
||||||
void onZoomFactor(int level);
|
void onZoomFactor(int level);
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,7 @@ void Node::swapRows( int a, int b )
|
||||||
TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tileSetName)
|
TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tileSetName)
|
||||||
{
|
{
|
||||||
m_parentItem = parent;
|
m_parentItem = parent;
|
||||||
|
m_oriented = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TileSetNode::~TileSetNode()
|
TileSetNode::~TileSetNode()
|
||||||
|
|
|
@ -75,9 +75,13 @@ public:
|
||||||
void setVegetSet( const QString &s ){ m_vegetSet = s; }
|
void setVegetSet( const QString &s ){ m_vegetSet = s; }
|
||||||
QString vegetSet() const{ return m_vegetSet; }
|
QString vegetSet() const{ return m_vegetSet; }
|
||||||
|
|
||||||
|
bool isOriented() const{ return m_oriented; }
|
||||||
|
void setOriented( bool b ){ m_oriented = b; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_tileSetName;
|
QString m_tileSetName;
|
||||||
QString m_vegetSet;
|
QString m_vegetSet;
|
||||||
|
bool m_oriented;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TileTypeNode : public Node
|
class TileTypeNode : public Node
|
||||||
|
|
|
@ -187,6 +187,8 @@ public:
|
||||||
addTilesToSet( set, n );
|
addTilesToSet( set, n );
|
||||||
setupTransitionTiles( set, n );
|
setupTransitionTiles( set, n );
|
||||||
setupDisplacementTiles( set, n );
|
setupDisplacementTiles( set, n );
|
||||||
|
|
||||||
|
set->setOriented( n->isOriented() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add tilesets to lands
|
// Add tilesets to lands
|
||||||
|
|
Loading…
Reference in a new issue