sculpto
Public Member Functions | List of all members
scl::scene_object_config_window Class Reference

#include <scene_object_config_window.h>

Public Member Functions

scene_object GetConfiguringObject () const
 
void SetConfiguringObject (scene_object ConfiguringObject)
 
 scene_object_config_window ()=default
 
void Draw ()
 

Detailed Description

Scene object components configuration GUI window class.

Definition at line 27 of file scene_object_config_window.h.

Constructor & Destructor Documentation

◆ scene_object_config_window()

scl::scene_object_config_window::scene_object_config_window ( )
default

Scene object components configuration GUI window default constructor.

Member Function Documentation

◆ Draw()

void scl::scene_object_config_window::Draw ( )
  • Draw scene object configuration window function.
Parameters
None.
Returns
None.

Definition at line 52 of file scene_object_config_window.cpp.

53{
54 ImGui::Begin("Scene Object Configuration");
55 {
56 if (!ConfiguringObject.IsOk())
57 {
58 ImGui::End();
59 return;
60 }
61
62 auto window_size = ImGui::GetWindowSize();
63 PanelWidth = (float)window_size.x - 15;
64
65 if (ConfiguringObject.HasComponent<name_component>())
66 DrawComponentPanel<name_component>();
67 if ((IsTransformComponent = ConfiguringObject.HasComponent<transform_component>()))
68 DrawComponentPanel<transform_component>();
69 if (ConfiguringObject.HasComponent<native_script_component>())
70 DrawComponentPanel<native_script_component>();
71 if ((IsMeshComponent = ConfiguringObject.HasComponent<mesh_component>()))
72 DrawComponentPanel<mesh_component>();
73 if ((IsCameraComponent = ConfiguringObject.HasComponent<camera_component>()))
74 DrawComponentPanel<camera_component>();
75 if ((IsPointLightComponent = ConfiguringObject.HasComponent<point_light_component>()))
76 DrawComponentPanel<point_light_component>();
77 if ((IsDirectionalLightComponent = ConfiguringObject.HasComponent<directional_light_component>()))
78 DrawComponentPanel<directional_light_component>();
79 if ((IsSpotLightComponent = ConfiguringObject.HasComponent<spot_light_component>()))
80 DrawComponentPanel<spot_light_component>();
81 ImGui::NewLine();
82
83 DrawAddComponentPanel();
84 }
85 ImGui::End();
86}
bool IsOk() const
Definition: scene_object.h:61
const bool HasComponent() const
Definition: scene_object.h:71

◆ GetConfiguringObject()

scl::scene_object scl::scene_object_config_window::GetConfiguringObject ( ) const

Scene object configuration window data getter/setter functions.

Currently configuring object getter function.

Definition at line 21 of file scene_object_config_window.cpp.

21{ return ConfiguringObject; }

◆ SetConfiguringObject()

void scl::scene_object_config_window::SetConfiguringObject ( scene_object  ConfiguringObject)

Currently configuring object setter function.

Definition at line 23 of file scene_object_config_window.cpp.

24{
25 this->ConfiguringObject = ConfiguringObject;
26 ResetData();
27}

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