aboutsummaryrefslogtreecommitdiff
path: root/core/src/UI/States.hpp
blob: d3144940af5044b7144e8d5a5955f6091ae4fc7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "cplt_fwd.hpp"

#include <imgui.h>
#include <memory>

/// Minimal state shared by all UI components, such as database, items, export, etc.
/// Note that global components (settings) is not supposed to access these.
class UIState
{
public:
	static void Init();
	static void Shutdown();
	static UIState& GetInstance();

public:
	std::unique_ptr<Project> CurrentProject;

public:
	void SetCurrentProject(std::unique_ptr<Project> project);
	void CloseCurrentProject();
};