Skip to content

Commit c32faf8

Browse files
committed
add debug visiblity on enabled button
Signed-off-by: Wojciech Czerski <[email protected]>
1 parent c038df1 commit c32faf8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Gems/FPSProfiler/Code/Source/Configurations/FPSProfilerConfig.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ namespace FPSProfiler::Configs
187187
})
188188

189189
->DataElement(
190-
AZ::Edit::UIHandlers::CheckBox,
190+
AZ::Edit::UIHandlers::Default,
191191
&PrecisionSettings::m_keepHistory,
192192
"Keep History",
193193
"Enabled saves entire history for better avg fps smoothing, otherwise history is cleared per auto save if "
@@ -220,12 +220,20 @@ namespace FPSProfiler::Configs
220220
AZ::Edit::UIHandlers::CheckBox,
221221
&DebugSettings::m_PrintDebugInfo,
222222
"Print Debug Info",
223-
"Enable or disable debug information printing")
223+
"Enable or disable debug information printing.")
224224

225-
->DataElement(AZ::Edit::UIHandlers::CheckBox, &DebugSettings::m_ShowFps, "Show FPS", "Toggle FPS display on screen")
225+
->DataElement(AZ::Edit::UIHandlers::CheckBox, &DebugSettings::m_ShowFps, "Show FPS", "Toggle FPS display on screen.")
226+
->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree)
226227

227228
->DataElement(
228-
AZ::Edit::UIHandlers::Color, &DebugSettings::m_Color, "Debug Color", "Set the debug information display color");
229+
AZ::Edit::UIHandlers::Color, &DebugSettings::m_Color, "Debug Color", "Set the debug information display color.")
230+
->Attribute(
231+
AZ::Edit::Attributes::Visibility,
232+
[](const void* instance)
233+
{
234+
const DebugSettings* data = static_cast<const DebugSettings*>(instance);
235+
return data && data->m_ShowFps ? AZ::Edit::PropertyVisibility::Show : AZ::Edit::PropertyVisibility::Hide;
236+
});
229237
}
230238
}
231239
}

0 commit comments

Comments
 (0)