Skip to content

Commit

Permalink
🚚 [main.cpp] Move init of command_line_args and Path to Cool
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Dec 5, 2024
1 parent cab6a66 commit 3dc0742
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ set(COOL_APP_NAME "Coollab")
add_subdirectory(Cool)
target_link_libraries(Coollab-Properties INTERFACE Cool::Core)
cool_setup(${PROJECT_NAME})

# Set app icon
Cool__set_app_icon(${PROJECT_NAME} "res/logo.png" "${CMAKE_SOURCE_DIR}/app-resources/icon.rc")

# Include cmd
Expand Down
2 changes: 1 addition & 1 deletion Cool
22 changes: 10 additions & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "App.h"
#include "Cool/CommandLineArgs/CommandLineArgs.h"
#include "Cool/Path/Path.h"
#include "Cool/Path/PathsConfig.h"
//
#include <Cool/Core/run.h> // Must be included last otherwise it slows down compilation because it includes <ser20/archives/json.hpp>
Expand All @@ -15,14 +13,14 @@ class PathsConfig : public Cool::PathsConfig {

auto main(int argc, char** argv) -> int
{
Cool::command_line_args().init(argc, argv);
Cool::Path::initialize<PathsConfig>();

Cool::run<Lab::App>({
.windows_configs = {Cool::WindowConfig{
.title = "", // This is set when we load a project.
.maximize_on_startup_if = true,
}},
.imgui_ini_version = 4,
});
Cool::run<Lab::App, PathsConfig>(
argc, argv,
{
.windows_configs = {{
.title = "", // This is set when we load a project. // TODO(Launcher) how do we set it now ?
.maximize_on_startup_if = true,
}},
.imgui_ini_version = 4,
}
);
}

0 comments on commit 3dc0742

Please sign in to comment.