+#include <msp/datafile/builtinsource.h>
#include <msp/fs/dir.h>
#include <msp/fs/stat.h>
#include "resources.h"
namespace Msp {
namespace DemoScene {
+void init_data(DataFile::BuiltinSource &);
+
+Resources::Resources()
+{
+ add_source(get_builtin_source());
+}
+
Resources::Resources(const string &pack_name):
ui_font(0),
ui_text_technique(0)
pack_source.add_pack_file(pack_name);
add_source(pack_source);
}
+
+ add_source(get_builtin_source());
+}
+
+const DataFile::CollectionSource &Resources::get_builtin_source()
+{
+ static DataFile::BuiltinSource builtin_src;
+ bool init_done = false;
+
+ if(!init_done)
+ {
+ init_data(builtin_src);
+ init_done = true;
+ }
+
+ return builtin_src;
+}
+
+Resources &Resources::get_builtins()
+{
+ static Resources builtins;
+ return builtins;
}
const GL::Font &Resources::get_ui_font() const
const Msp::GL::Font *ui_font;
const Msp::GL::Technique *ui_text_technique;
+ Resources();
public:
Resources(const std::string &);
+private:
+ static const DataFile::CollectionSource &get_builtin_source();
+public:
+ static Resources &get_builtins();
+
const Msp::GL::Font &get_ui_font() const;
const Msp::GL::Technique &get_ui_text_technique() const;
void set_ui_text_resources(const std::string &, const std::string &);