Hymn to Beauty
C++ 3D Engine
TextureEditor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include "../FileSelector.hpp"
5
6class TextureAsset;
7
8namespace GUI {
11 public:
14
16 void Show();
17
19
22 const TextureAsset* GetTexture() const;
23
25
28 void SetTexture(TextureAsset* texture);
29
31
34 bool IsVisible() const;
35
37
40 void SetVisible(bool visible);
41
42 private:
43 void FileSelected(const std::string& file);
44
45 TextureAsset* texture = nullptr;
46 bool visible = false;
47
48 FileSelector fileSelector;
49
50 char name[128];
51
52 std::string path;
53 std::string extension;
54 int compressionType = 0;
55};
56} // namespace GUI
A window where a file can be selected.
Definition: FileSelector.hpp:9
Used to edit a texture.
Definition: TextureEditor.hpp:10
void Show()
Show the editor.
Definition: TextureEditor.cpp:18
TextureEditor()
Constructor.
Definition: TextureEditor.cpp:14
bool IsVisible() const
Get whether the window is visible.
Definition: TextureEditor.cpp:61
const TextureAsset * GetTexture() const
Get the texture being edited.
Definition: TextureEditor.cpp:47
void SetTexture(TextureAsset *texture)
Set the texture to edit.
Definition: TextureEditor.cpp:51
void SetVisible(bool visible)
Set whether the window should be visible.
Definition: TextureEditor.cpp:65
A texture used in a hymn.
Definition: TextureAsset.hpp:12
Definition: AssetEditor.hpp:9