mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 11:00:54 +00:00
Texture path.
This commit is contained in:
parent
716903fd5f
commit
1309834e49
5 changed files with 27 additions and 6 deletions
|
@ -449,4 +449,14 @@ unsigned long TileBank::getSurfaceData( int tileSet ) const
|
|||
return set->SurfaceData;
|
||||
}
|
||||
|
||||
void TileBank::setTexturePath( const QString &path )
|
||||
{
|
||||
m_pvt->m_bank.setAbsPath( path.toUtf8().constData() );
|
||||
}
|
||||
|
||||
QString TileBank::getTexturePath() const
|
||||
{
|
||||
return m_pvt->m_bank.getAbsPath().c_str();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,9 @@ public:
|
|||
|
||||
void setSurfaceData( int tileSet, unsigned long data );
|
||||
unsigned long getSurfaceData( int tileSet ) const;
|
||||
|
||||
void setTexturePath( const QString &path );
|
||||
QString getTexturePath() const;
|
||||
|
||||
bool hasError() const{ return m_hasError; }
|
||||
QString getLastError() const{ return m_lastError; }
|
||||
|
|
|
@ -816,7 +816,7 @@ void TileEditorMainWindow::onTileBankLoaded()
|
|||
m_ui->listView256->reset();
|
||||
m_ui->listViewTransition->reset();
|
||||
|
||||
QString path = m_tileModel->texturePath();
|
||||
QString path = m_tileModel->getTexturePath();
|
||||
if( path.isEmpty() )
|
||||
m_ui->tileBankTexturePathPB->setText( "..." );
|
||||
else
|
||||
|
|
|
@ -426,6 +426,16 @@ unsigned long TileModel::getSurfaceData( int tileSet ) const
|
|||
return m_tileBank->getSurfaceData( tileSet );
|
||||
}
|
||||
|
||||
void TileModel::setTexturePath( const QString &path )
|
||||
{
|
||||
m_tileBank->setTexturePath( path );
|
||||
}
|
||||
|
||||
QString TileModel::getTexturePath() const
|
||||
{
|
||||
return m_tileBank->getTexturePath();
|
||||
}
|
||||
|
||||
QString TileModel::getLastError() const{
|
||||
return m_tileBank->getLastError();
|
||||
}
|
||||
|
|
|
@ -85,9 +85,6 @@ public:
|
|||
|
||||
void clear();
|
||||
|
||||
void setTexturePath( const QString &path ){ m_texturePath = path; }
|
||||
QString texturePath() const{ return m_texturePath; }
|
||||
|
||||
void addLand( const QString &name );
|
||||
void removeLand( int idx );
|
||||
void removeTileSet( int idx );
|
||||
|
@ -107,6 +104,9 @@ public:
|
|||
void setSurfaceData( int tileSet, unsigned long data );
|
||||
unsigned long getSurfaceData( int tileSet ) const;
|
||||
|
||||
void setTexturePath( const QString &path );
|
||||
QString getTexturePath() const;
|
||||
|
||||
QString getLastError() const;
|
||||
bool hasError() const;
|
||||
|
||||
|
@ -125,8 +125,6 @@ private:
|
|||
//int m_activeEditChannel;
|
||||
Node *rootItem;
|
||||
|
||||
QString m_texturePath;
|
||||
|
||||
TileBank *m_tileBank;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue