20#include <filedialog/filedialog.h>
28 entt::meta_factory<editor>{}
31 .func<&editor::init>(
"init"_hs)
33 .func<&editor::destroy>(
"destroy"_hs)
35 .func<&editor::interrupt>(
"interrupt"_hs);
48 fs::path editor_data = binary_path /
"data" /
"editor";
70 ls.
set_on_fail([](
const std::string& module,
const std::string& message) ->
void
72 native::message_box(message, native::dialog_type::ok, native::icon_type::error, module);
81 ls.begin_module(
"Window");
82 if(!ls.check(init_window(ctx)))
98 ls.begin_module(
"Editor UI");
107 ls.set_visualizer([&imgui, &ctx](
const loading_screen& screen) ->
void
109 imgui.render_loading_frame(ctx,
119 ls.begin_module(
"Asset Watcher");
121 if(!ls.check(aw.init(ctx)))
125 ls.begin_module(
"Engine Assets");
126 aw.
watch_assets(ctx,
"engine:/",
true, [&ls](
size_t completed,
size_t total,
const std::string& job) ->
void
128 ls.progress(completed, total, job);
141 ls.begin_module(
"Editor Assets");
142 aw.watch_assets(ctx,
"editor:/",
true, [&ls](
size_t completed,
size_t total,
const std::string& job) ->
void
144 ls.progress(completed, total, job);
149 ls.begin_module(
"Editor UI Finalize");
155 ls.begin_module(
"Hub");
156 if(!ls.check(ctx.get_cached<
hub>().
init(ctx)))
161 ls.begin_module(
"Editing");
167 ls.begin_module(
"Picking");
173 ls.begin_module(
"Thumbnails");
179 ls.begin_module(
"Project Manager");
185 ls.begin_module(
"Version Manager");
191 ls.begin_module(
"MCP Server");
203 uint32_t flags = os::window::resizable | os::window::maximized;
204 auto primary_display = os::display::get_primary_display_index();
206 auto& rend = ctx.get_cached<
renderer>();
265 aw.unwatch_assets(ctx,
"engine:/");
auto deinit(rtti::context &ctx) -> bool
void watch_assets(rtti::context &ctx, const std::string &protocol, bool wait=false, const on_wait_progress_t &on_progress=nullptr)
void unwatch_assets(rtti::context &ctx, const std::string &protocol)
auto deinit(rtti::context &ctx) -> bool
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool
auto init_finalize(rtti::context &ctx) -> bool
Phase 2: creates the cubemap shader program from compiled editor:/ assets.
auto init_basic(rtti::context &ctx) -> bool
Phase 1: creates ImGui context, embedded shaders, fonts. No asset dependencies.
auto deinit(rtti::context &ctx) -> bool
auto init(rtti::context &ctx) -> bool
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool
auto init(rtti::context &ctx, const cmd_line::parser &parser) -> bool
auto deinit(rtti::context &ctx) -> bool
bool add_path_protocol(const std::string &protocol, const path &dir)
Allows us to map a protocol to a specific directory. A path protocol gives the caller the ability to ...
path resolve_protocol(const path &_path)
Given the specified path/filename, resolve the final full filename. This will be based on either the ...
renderer_type get_renderer_type()
const char * get_renderer_name(renderer_type _type)
auto get_full() -> std::string
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool
static auto create(rtti::context &ctx, cmd_line::parser &parser) -> bool
static auto interrupt() -> bool
static auto destroy() -> bool
static auto process() -> int
static auto init(const cmd_line::parser &parser) -> bool
static auto deinit() -> bool
static auto init_window(rtti::context &ctx) -> bool
static auto process() -> int
static auto init_systems(const cmd_line::parser &parser) -> bool
static auto destroy() -> bool
static auto context() -> rtti::context &
static auto deinit() -> bool
static auto interrupt() -> bool
static auto create(rtti::context &ctx, cmd_line::parser &parser) -> bool
static auto init_core(const cmd_line::parser &parser) -> bool
auto current_module() const -> const std::string &
auto completed() const -> size_t
auto current_job() const -> const std::string &
void set_on_fail(on_fail_fn fn)
auto total() const -> size_t
auto create_window_for_display(int index, const std::string &title, uint32_t flags) -> const std::unique_ptr< render_window > &
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool
auto init(rtti::context &ctx) -> bool
auto deinit(rtti::context &ctx) -> bool