mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +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 auto numFrames = mainFrameSet ? m_frames->frames.size() - 1 : m_frames->frames.size();
|
||||
const auto frameOffset = mainFrameSet ? 0 : 1;
|
||||
bool goClicked = false;
|
||||
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 ) );
|
||||
ImGui::SameLine();
|
||||
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 ) );
|
||||
}
|
||||
if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user