Skip to content

Commit

Permalink
- use better widgets for environment ui
Browse files Browse the repository at this point in the history
  • Loading branch information
kaffeewolf committed Nov 9, 2024
1 parent 0d358f0 commit d1b73f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions toolkit/editor/editor/ui/windows/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ Environment::Run(SaveMode save)
//const Math::vec3& color, const float intensity, const Math::vec3& ambient, const Math::vec3& backlight, const float backlightFactor, const float zenith, const float azimuth, bool castShadows = false);
Math::vec3 color = LightContext::GetColor(globalLight);
float intensity = LightContext::GetIntensity(globalLight);
if (ImGui::InputFloat3("Global light Color", &color.x))
if (ImGui::ColorEdit3("Global light Color", &color.x))
{
LightContext::SetColor(globalLight, color);
}
if (ImGui::InputFloat("Intensity", &intensity))
if (ImGui::SliderFloat("Intensity", &intensity, 0.0f, 1000.0f))
{
LightContext::SetIntensity(globalLight, intensity);
}

Math::vec3 ambient = LightContext::GetAmbient(globalLight);
if (ImGui::InputFloat3("Ambient", &ambient.x))
if (ImGui::ColorEdit3("Ambient", &ambient.x))
{
LightContext::SetAmbient(globalLight, ambient);
}
Expand Down

0 comments on commit d1b73f4

Please sign in to comment.