Skip to content

Commit

Permalink
⬆ [Cool] Added ServerManager
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Aug 25, 2024
1 parent 4a3a765 commit 4507580
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
14 changes: 5 additions & 9 deletions src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "Cool/Log/Message.h"
#include "Cool/OSC/OSCChannel.h"
#include "Cool/OSC/OSCManager.h"
#include "Cool/Server/ServerManager.hpp"
#include "Cool/Tips/TipsManager.h"
#include "Cool/Video/hack_get_global_time_in_seconds.h"
#include "Cool/View/View.h"
Expand Down Expand Up @@ -71,15 +72,6 @@ App::App(Cool::WindowManager& windows, Cool::ViewsManager& views)

_project.camera_3D_manager.hook_events(_preview_view.mouse_events(), command_executor());
_project.camera_2D_manager.hook_events(_preview_view.mouse_events(), command_executor());

// serv::init([](std::string_view request) {
// Cool::Log::Debug::info("Scripting", "{}", request);
// });
}

App::~App()
{
// serv::shut_down();
}

void App::on_shutdown()
Expand Down Expand Up @@ -394,6 +386,8 @@ void App::imgui_windows_only_when_inputs_are_allowed()
Cool::midi_manager().imgui_window();
// OSC
Cool::osc_manager().imgui_window();
// Server
Cool::server_manager().imgui_window();
// Tips
_tips_manager.imgui_windows(all_tips());
// Nodes
Expand Down Expand Up @@ -525,6 +519,8 @@ void App::commands_menu()
Cool::midi_manager().open_config_window();
if (ImGui::Selectable(ICOMOON_CONNECTION " Open OSC config"))
Cool::osc_manager().open_config_window();
if (ImGui::Selectable(ICOMOON_CONNECTION " Open Server config"))
Cool::server_manager().open_config_window();
if (ImGui::Selectable(ICOMOON_MUSIC " Open Audio config"))
_project.audio.open_imgui_window();
if (ImGui::Selectable(ICOMOON_IMAGE " Open output window"))
Expand Down
5 changes: 3 additions & 2 deletions src/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "Cool/Midi/MidiManager.h"
#include "Cool/Nodes/NodesLibrary.h"
#include "Cool/OSC/OSCManager.h"
#include "Cool/Server/ServerManager.hpp"
#include "Cool/StrongTypes/Camera2D.h"
#include "Cool/Tips/TipsManager.h"
#include "Cool/View/ForwardingOrRenderView.h"
Expand All @@ -41,7 +42,6 @@ using DebugOptionsManager = Cool::DebugOptionsManager<
class App : public Cool::IApp {
public:
explicit App(Cool::WindowManager& windows, Cool::ViewsManager& views);
~App();
void on_shutdown() override;

void update() override;
Expand Down Expand Up @@ -127,7 +127,8 @@ class App : public Cool::IApp {
ser20::make_nvp("Output view", app._output_view),
ser20::make_nvp("Webcams config", Cool::WebcamsConfigs::instance()),
ser20::make_nvp("MIDI config", Cool::midi_manager()),
ser20::make_nvp("OSC config", Cool::osc_manager())
ser20::make_nvp("OSC config", Cool::osc_manager()),
ser20::make_nvp("Server config", Cool::server_manager())
);
}
template<class Archive>
Expand Down

0 comments on commit 4507580

Please sign in to comment.