2013-09-29 09:11:57 +02:00
|
|
|
#ifndef CONTENTLOADER_HPP
|
|
|
|
#define CONTENTLOADER_HPP
|
|
|
|
|
|
|
|
#include <boost/filesystem/path.hpp>
|
2017-08-25 11:05:56 +01:00
|
|
|
#include <MyGUI_TextIterator.h>
|
2013-09-29 09:11:57 +02:00
|
|
|
|
2018-08-14 23:05:43 +04:00
|
|
|
#include <components/debug/debuglog.hpp>
|
2013-09-29 09:11:57 +02:00
|
|
|
#include "components/loadinglistener/loadinglistener.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ContentLoader
|
|
|
|
{
|
|
|
|
ContentLoader(Loading::Listener& listener)
|
|
|
|
: mListener(listener)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~ContentLoader()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void load(const boost::filesystem::path& filepath, int& index)
|
|
|
|
{
|
2018-08-14 23:05:43 +04:00
|
|
|
Log(Debug::Info) << "Loading content file " << filepath.string();
|
|
|
|
mListener.setLabel(MyGUI::TextIterator::toTagsString(filepath.string()));
|
2013-09-29 09:11:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Loading::Listener& mListener;
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace MWWorld */
|
|
|
|
|
|
|
|
#endif /* CONTENTLOADER_HPP */
|