File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#include < ruis/widget/label/TextLabel.hpp>
44#include < ruis/widget/button/Button.hpp>
55
6+ // TODO: rewrite
67
78class Application : public ruisapp ::application{
89public:
Original file line number Diff line number Diff line change @@ -92,9 +92,9 @@ application::~application()
9292}
9393
9494#if CFG_OS_NAME != CFG_OS_NAME_ANDROID && CFG_OS_NAME != CFG_OS_NAME_IOS
95- std::unique_ptr <fsif::file> application::get_res_file (std::string_view path) const
95+ utki::unique_ref <fsif::file> application::get_res_file (std::string_view path) const
9696{
97- return std ::make_unique<fsif::native_file>(path);
97+ return utki ::make_unique<fsif::native_file>(path);
9898}
9999#endif
100100
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class application : public utki::intrusive_singleton<application>
7474 * @param path - file path to initialize the file interface with.
7575 * @return Instance of the file interface into the resources storage.
7676 */
77- std::unique_ptr <fsif::file> get_res_file (std::string_view path = {}) const ;
77+ utki::unique_ref <fsif::file> get_res_file (std::string_view path = {}) const ;
7878
7979 /* *
8080 * @brief Aggregation of application directory locations.
Original file line number Diff line number Diff line change @@ -149,12 +149,12 @@ ruisapp::application::application(parameters params) :
149149 )
150150{}
151151
152- std::unique_ptr <fsif::file> ruisapp::application::get_res_file (std::string_view path) const
152+ utki::unique_ref <fsif::file> ruisapp::application::get_res_file (std::string_view path) const
153153{
154154 utki::assert (globals_wrapper::native_activity, SL);
155155 utki::assert (globals_wrapper::native_activity->assetManager , SL);
156156
157- return std ::make_unique<asset_file>(
157+ return utki ::make_unique<asset_file>(
158158 globals_wrapper::native_activity->assetManager , //
159159 path
160160 );
Original file line number Diff line number Diff line change @@ -129,14 +129,14 @@ ruisapp::application::application(parameters params) :
129129 )
130130{}
131131
132- std::unique_ptr <fsif::file> ruisapp::application::get_res_file (std::string_view path) const
132+ utki::unique_ref <fsif::file> ruisapp::application::get_res_file (std::string_view path) const
133133{
134134 std::string dir ([[[NSBundle mainBundle] resourcePath] fileSystemRepresentation]);
135135
136136 // TRACE(<< "res path = " << dir << std::endl)
137137
138- auto rdf = std ::make_unique<fsif::root_dir>(
139- std ::make_unique<fsif::native_file>(), //
138+ auto rdf = utki ::make_unique<fsif::root_dir>(
139+ utki ::make_unique<fsif::native_file>(), //
140140 dir + " /" // TODO: use utki::cat()?
141141 );
142142 rdf->set_path (path);
Original file line number Diff line number Diff line change @@ -72,9 +72,9 @@ class application : public ruisapp::application{
7272 this ->quit ();
7373 };
7474
75- this ->window .gui .init_standard_widgets (* this ->get_res_file (" ../../res/ruis_res/" ));
75+ this ->window .gui .init_standard_widgets (this ->get_res_file (" ../../res/ruis_res/" ));
7676
77- this ->window .gui .context .get ().loader ().mount_res_pack (* this ->get_res_file (" res/" ));
77+ this ->window .gui .context .get ().loader ().mount_res_pack (this ->get_res_file (" res/" ));
7878
7979 auto c = make_root_widget (this ->window .gui .context );
8080 this ->window .gui .set_root (c);
You can’t perform that action at this time.
0 commit comments