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;
|
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 );
|
void setSurfaceData( int tileSet, unsigned long data );
|
||||||
unsigned long getSurfaceData( int tileSet ) const;
|
unsigned long getSurfaceData( int tileSet ) const;
|
||||||
|
|
||||||
|
void setTexturePath( const QString &path );
|
||||||
|
QString getTexturePath() const;
|
||||||
|
|
||||||
bool hasError() const{ return m_hasError; }
|
bool hasError() const{ return m_hasError; }
|
||||||
QString getLastError() const{ return m_lastError; }
|
QString getLastError() const{ return m_lastError; }
|
||||||
|
|
|
@ -816,7 +816,7 @@ void TileEditorMainWindow::onTileBankLoaded()
|
||||||
m_ui->listView256->reset();
|
m_ui->listView256->reset();
|
||||||
m_ui->listViewTransition->reset();
|
m_ui->listViewTransition->reset();
|
||||||
|
|
||||||
QString path = m_tileModel->texturePath();
|
QString path = m_tileModel->getTexturePath();
|
||||||
if( path.isEmpty() )
|
if( path.isEmpty() )
|
||||||
m_ui->tileBankTexturePathPB->setText( "..." );
|
m_ui->tileBankTexturePathPB->setText( "..." );
|
||||||
else
|
else
|
||||||
|
|
|
@ -426,6 +426,16 @@ unsigned long TileModel::getSurfaceData( int tileSet ) const
|
||||||
return m_tileBank->getSurfaceData( tileSet );
|
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{
|
QString TileModel::getLastError() const{
|
||||||
return m_tileBank->getLastError();
|
return m_tileBank->getLastError();
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,9 +85,6 @@ public:
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
void setTexturePath( const QString &path ){ m_texturePath = path; }
|
|
||||||
QString texturePath() const{ return m_texturePath; }
|
|
||||||
|
|
||||||
void addLand( const QString &name );
|
void addLand( const QString &name );
|
||||||
void removeLand( int idx );
|
void removeLand( int idx );
|
||||||
void removeTileSet( int idx );
|
void removeTileSet( int idx );
|
||||||
|
@ -107,6 +104,9 @@ public:
|
||||||
void setSurfaceData( int tileSet, unsigned long data );
|
void setSurfaceData( int tileSet, unsigned long data );
|
||||||
unsigned long getSurfaceData( int tileSet ) const;
|
unsigned long getSurfaceData( int tileSet ) const;
|
||||||
|
|
||||||
|
void setTexturePath( const QString &path );
|
||||||
|
QString getTexturePath() const;
|
||||||
|
|
||||||
QString getLastError() const;
|
QString getLastError() const;
|
||||||
bool hasError() const;
|
bool hasError() const;
|
||||||
|
|
||||||
|
@ -125,8 +125,6 @@ private:
|
||||||
//int m_activeEditChannel;
|
//int m_activeEditChannel;
|
||||||
Node *rootItem;
|
Node *rootItem;
|
||||||
|
|
||||||
QString m_texturePath;
|
|
||||||
|
|
||||||
TileBank *m_tileBank;
|
TileBank *m_tileBank;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue