Hymn to Beauty
C++ 3D Engine
ResourceSelector.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Resources.hpp"
4
5namespace GUI {
8 public:
12
15 std::string GetPath() const;
16
19
21 std::string path;
22 };
23
25 ResourceSelector() = default;
26
28
32
34
38
39 private:
40 bool ShowHelper(ResourceList::Resource::Type type, const ResourceList::ResourceFolder& folder, const std::string& path);
41
42 SelectedResource selectedResource;
43};
44} // namespace GUI
Used to select a resource from the resource list.
Definition: ResourceSelector.hpp:7
const SelectedResource & GetSelectedResource() const
Get the selected resource.
Definition: ResourceSelector.cpp:16
ResourceSelector()=default
Default constructor.
bool Show(ResourceList::Resource::Type type)
Show the resource selector and let the user select a resource.
Definition: ResourceSelector.cpp:12
Definition: AssetEditor.hpp:9
Information about the selected resource.
Definition: ResourceSelector.hpp:10
const ResourceList::Resource * resource
The selected resource.
Definition: ResourceSelector.hpp:18
std::string path
The path to the resource.
Definition: ResourceSelector.hpp:21
std::string GetPath() const
Get path (including name).
Definition: ResourceSelector.cpp:8
A folder containing resources.
Definition: Resources.hpp:50
A resource.
Definition: Resources.hpp:23
Type
The type of resource.
Definition: Resources.hpp:34