Add time-relative switch to message list in zone info window.

This commit is contained in:
Bartosz Taudul 2019-11-27 01:42:44 +01:00
parent 3e47fd6bcd
commit ade01e98ad
2 changed files with 4 additions and 1 deletions

View File

@ -6117,6 +6117,8 @@ void View::DrawZoneInfoWindow()
ImGui::TextDisabled( "(%s)", RealToString( dist, true ) );
if( expand )
{
ImGui::SameLine();
SmallCheckbox( "Time relative to zone start", &m_messageTimeRelativeToZone );
static bool widthSet = false;
ImGui::Columns( 2 );
if( !widthSet )
@ -6134,7 +6136,7 @@ void View::DrawZoneInfoWindow()
do
{
ImGui::PushID( *msgit );
if( ImGui::Selectable( TimeToString( (*msgit)->time - ev.Start() ), m_msgHighlight == *msgit, ImGuiSelectableFlags_SpanAllColumns ) )
if( ImGui::Selectable( TimeToString( m_messageTimeRelativeToZone ? (*msgit)->time - ev.Start() : (*msgit)->time ), m_msgHighlight == *msgit, ImGuiSelectableFlags_SpanAllColumns ) )
{
CenterAtTime( (*msgit)->time );
}

View File

@ -346,6 +346,7 @@ private:
bool m_groupChildrenLocations = false;
bool m_allocTimeRelativeToZone = true;
bool m_ctxSwitchTimeRelativeToZone = true;
bool m_messageTimeRelativeToZone = true;
ShortcutAction m_shortcut = ShortcutAction::None;
Namespace m_namespace = Namespace::Short;