Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
project_manager.h
1#pragma once
2
3#include "gluten/managers/manager.h"
4#include "sound_bakery/core/database/database_object.h"
5#include "sound_bakery/system.h"
6
7#include "yaml-cpp/yaml.h"
8
9namespace sbk::engine
10{
11 class sound_container;
12}
13
15{
16 selection() = default;
17
18 void selected_object(sbk::core::object* object) { m_selected = object; }
19
20 std::optional<rttr::type> selected_type() const
21 {
22 if (m_selected)
23 {
24 return m_selected->getType();
25 }
26 return std::nullopt;
27 }
28
29 sbk::core::object* get_selected() const { return m_selected; }
30
31private:
32 sbk::core::object* m_selected = nullptr;
33};
34
35class project_manager : public gluten::manager
36{
37public:
38 project_manager(gluten::app* appOwner) : gluten::manager(appOwner) {}
39
40public:
41 void init_project(const std::filesystem::path& project_file);
42
43 virtual void tick(double deltaTime) override;
44 virtual void exit() override;
45
46 void save_project() const;
47
48 selection& get_selection() { return m_selection; }
49 sbk::engine::sound_container* get_preview_sound_container() const;
50
51private:
52 selection m_selection;
53};
Definition project_manager.h:36
Base object that all sound Bakery objects should inherit from.
Definition object.h:21
Definition sound_container.h:10
Definition project_manager.h:15