Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::Editor::SkyboxEditorWidget Class Reference

#include <SkyboxEditorWidget.h>

Inheritance diagram for Elevate::Editor::SkyboxEditorWidget:
Elevate::Editor::EditorWidget

Public Member Functions

void OnImGuiRender () override
 
- Public Member Functions inherited from Elevate::Editor::EditorWidget
 EditorWidget ()=default
 
virtual ~EditorWidget ()=default
 
virtual void OnUpdate ()
 

Detailed Description

Definition at line 10 of file SkyboxEditorWidget.h.

Member Function Documentation

◆ OnImGuiRender()

void Elevate::Editor::SkyboxEditorWidget::OnImGuiRender ( )
inlineoverridevirtual

Reimplemented from Elevate::Editor::EditorWidget.

Definition at line 13 of file SkyboxEditorWidget.h.

14 {
15 ImGui::Begin("Environment");
16 ImGui::SeparatorText("Skybox");
17
19 auto skybox = scene->GetSkybox().lock();
20
21 if (ImGui::Button("Select Skybox File"))
22 {
24 "Select a skybox file",
25 "",
26 { "*.sky" },
27 "*.sky - Elevate Skybox File",
28 false
29 );
30 }
31
32 std::string filePath;
34 {
35 EE_CORE_TRACE("Setting new scene skybox from file : {}", filePath);
36 if (!filePath.empty())
37 {
38 scene->SetSkybox(filePath);
39 }
40 }
41
42 if (scene && skybox)
43 {
44 ImGui::Text("Skybox : %s", skybox->GetFilePath().c_str());
45 // Skybox textures preview
46 for (int i = 0; i < 6; i++)
47 {
48
49 }
50 }
51 else
52 {
53 ImGui::Text("Skybox : (none)");
54 }
55
56 ImGui::End();
57 }
static std::string RequestOpenFile(const std::string &title, const std::string &defaultPathOrFile, const std::vector< std::string > &filters, const std::string &filterDescription, bool allowMultiple)
static bool DisplayAndGetResult(std::string &outPath)
static ScenePtr GetCurrentScene()
@ RuntimeScene
Definition Scene.h:29

The documentation for this class was generated from the following file: