mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Remove "Go to frame" button.
This commit is contained in:
parent
81c66ad126
commit
601f0a17df
@ -971,16 +971,10 @@ bool View::DrawImpl()
|
|||||||
const bool mainFrameSet = m_frames->name == 0;
|
const bool mainFrameSet = m_frames->name == 0;
|
||||||
const auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size();
|
const auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size();
|
||||||
const auto frameOffset = mainFrameSet ? 0 : 1;
|
const auto frameOffset = mainFrameSet ? 0 : 1;
|
||||||
bool goClicked = false;
|
|
||||||
ImGui::SetNextItemWidth( 120 );
|
ImGui::SetNextItemWidth( 120 );
|
||||||
goClicked |= ImGui::InputInt( "##goToFrame", &frameNum, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue );
|
const bool clicked = ImGui::InputInt( "##goToFrame", &frameNum, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue );
|
||||||
frameNum = std::min( std::max( frameNum, 1 ), int( numFrames ) );
|
frameNum = std::min( std::max( frameNum, 1 ), int( numFrames ) );
|
||||||
ImGui::SameLine();
|
if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
||||||
goClicked |= ImGui::Button( ICON_FA_CROSSHAIRS " Go to frame" );
|
|
||||||
if( goClicked )
|
|
||||||
{
|
|
||||||
ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
|
||||||
}
|
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user