Cleanup.
This commit is contained in:
parent
d7659423fe
commit
0df9a005fa
@ -528,19 +528,21 @@ public:
|
||||
ImGui::Checkbox("IBL Diffuse", &m_settings.m_doDiffuseIbl);
|
||||
ImGui::Checkbox("IBL Specular", &m_settings.m_doSpecularIbl);
|
||||
|
||||
if (ImGui::BeginTabBar("Cubemap", ImGuiTabBarFlags_None) )
|
||||
{
|
||||
float tabWidth = ImGui::GetContentRegionAvailWidth() / 2.0f;
|
||||
if (ImGui::TabButton("Bolonga", tabWidth, m_currentLightProbe == LightProbe::Bolonga) )
|
||||
if (ImGui::BeginTabItem("Bolonga") )
|
||||
{
|
||||
m_currentLightProbe = LightProbe::Bolonga;
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
ImGui::SameLine(0.0f,0.0f);
|
||||
|
||||
if (ImGui::TabButton("Kyoto", tabWidth, m_currentLightProbe == LightProbe::Kyoto) )
|
||||
if (ImGui::BeginTabItem("Kyoto") )
|
||||
{
|
||||
m_currentLightProbe = LightProbe::Kyoto;
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
|
||||
ImGui::SliderFloat("Texture LOD", &m_settings.m_lod, 0.0f, 10.1f);
|
||||
@ -579,41 +581,33 @@ public:
|
||||
selection = UINT8_C(1);
|
||||
}
|
||||
|
||||
float tabWidth = ImGui::GetContentRegionAvailWidth() / 3.0f;
|
||||
if (ImGui::TabButton("Skybox", tabWidth, selection == 0) )
|
||||
if (ImGui::BeginTabBar("CubemapSelection", ImGuiTabBarFlags_None) )
|
||||
{
|
||||
selection = 0;
|
||||
}
|
||||
|
||||
ImGui::SameLine(0.0f,0.0f);
|
||||
if (ImGui::TabButton("Radiance", tabWidth, selection == 1) )
|
||||
if (ImGui::BeginTabItem("Radiance") )
|
||||
{
|
||||
selection = 1;
|
||||
m_settings.m_bgType = 7.0f;
|
||||
|
||||
ImGui::SliderFloat("Mip level", &m_settings.m_radianceSlider, 1.0f, 6.0f);
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
ImGui::SameLine(0.0f,0.0f);
|
||||
if (ImGui::TabButton("Irradiance", tabWidth, selection == 2) )
|
||||
if (ImGui::BeginTabItem("Irradiance") )
|
||||
{
|
||||
selection = 2;
|
||||
}
|
||||
|
||||
if (0 == selection)
|
||||
{
|
||||
m_settings.m_bgType = 0.0f;
|
||||
}
|
||||
else if (2 == selection)
|
||||
{
|
||||
m_settings.m_bgType = 7.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings.m_bgType = m_settings.m_radianceSlider;
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
const bool isRadiance = (selection == 1);
|
||||
if (isRadiance)
|
||||
if (ImGui::BeginTabItem("Skybox") )
|
||||
{
|
||||
ImGui::SliderFloat("Mip level", &m_settings.m_radianceSlider, 1.0f, 6.0f);
|
||||
selection = 0;
|
||||
m_settings.m_bgType = 0.0f;
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
}
|
||||
ImGui::Unindent();
|
||||
|
@ -108,27 +108,6 @@ namespace ImGui
|
||||
SetCursorPosY(GetCursorPosY() + GetTextLineHeightWithSpacing() );
|
||||
}
|
||||
|
||||
inline bool TabButton(const char* _text, float _width, bool _active)
|
||||
{
|
||||
int32_t count = 1;
|
||||
|
||||
if (_active)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1.0f, 0.75f, 0.0f, 0.78f) );
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f ) );
|
||||
count = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.5f, 0.5f, 0.5f, 0.7f) );
|
||||
}
|
||||
|
||||
bool retval = ImGui::Button(_text, ImVec2(_width, 20.0f) );
|
||||
ImGui::PopStyleColor(count);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
inline bool MouseOverArea()
|
||||
{
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user