55
66#include < gf2/core/AnimationData.h>
77#include < gf2/core/AudioSourceData.h>
8+ #include < gf2/core/ConsoleData.h>
89#include < gf2/core/FontFace.h>
910#include < gf2/core/NinePatchData.h>
1011#include < gf2/core/RichMapResource.h>
@@ -58,6 +59,11 @@ namespace gf {
5859 }
5960 }
6061
62+ void BundleBuilder::add_in_bundle (const ConsoleResource& resource)
63+ {
64+ add_raw_console_font (resource.console_font , resource.data );
65+ }
66+
6167 void BundleBuilder::add_in_bundle (const NinePatchResource& resource)
6268 {
6369 add_raw_texture (resource.texture );
@@ -111,6 +117,12 @@ namespace gf {
111117 m_musics.push_back (path);
112118 }
113119
120+ void BundleBuilder::add_raw_console_font (const std::filesystem::path& path, const ConsoleData& data)
121+ {
122+ m_console_fonts.push_back ({ path, data });
123+ }
124+
125+
114126 ResourceBundle BundleBuilder::make_bundle () const
115127 {
116128 // capture 'this' by copy in case the bundle builder is a local variable
@@ -134,6 +146,11 @@ namespace gf {
134146 for (const std::filesystem::path& music : m_musics) {
135147 bundle->handle <Music>(music, m_audio_manager, resource_manager, action);
136148 }
149+
150+ for (const ConsoleResource& console_resource : m_console_fonts) {
151+ bundle->handle <ConsoleFont>(console_resource.console_font , { console_resource.data .font_format , console_resource.data .font_size , m_render_manager }, resource_manager, action);
152+ }
153+
137154 });
138155
139156 return bundle;
0 commit comments