mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Texture path.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
bdedd145e4
commit
92e850d296
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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,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; }
|
||||
void resetError(){
|
||||
|
|
|
@ -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