mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add view start and end to TimelineContext.
This commit is contained in:
parent
0a32929b0b
commit
5b3427395e
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "TracyImGui.hpp"
|
#include "TracyImGui.hpp"
|
||||||
#include "TracyTimelineController.hpp"
|
#include "TracyTimelineController.hpp"
|
||||||
|
#include "TracyView.hpp"
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
@ -106,6 +107,8 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
|
|||||||
UpdateCenterItem();
|
UpdateCenterItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto& viewData = m_view.GetViewData();
|
||||||
|
|
||||||
TimelineContext ctx;
|
TimelineContext ctx;
|
||||||
ctx.w = ImGui::GetContentRegionAvail().x - 1;
|
ctx.w = ImGui::GetContentRegionAvail().x - 1;
|
||||||
ctx.ty = ImGui::GetTextLineHeight();
|
ctx.ty = ImGui::GetTextLineHeight();
|
||||||
@ -114,6 +117,8 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
|
|||||||
ctx.yMax = yMax;
|
ctx.yMax = yMax;
|
||||||
ctx.pxns = pxns;
|
ctx.pxns = pxns;
|
||||||
ctx.nspx = 1.0 / pxns;
|
ctx.nspx = 1.0 / pxns;
|
||||||
|
ctx.vStart = viewData.zvStart;
|
||||||
|
ctx.vEnd = viewData.zvEnd;
|
||||||
ctx.wpos = wpos;
|
ctx.wpos = wpos;
|
||||||
ctx.hover = hover;
|
ctx.hover = hover;
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ struct TimelineContext
|
|||||||
float w, ty, scale;
|
float w, ty, scale;
|
||||||
float yMin, yMax;
|
float yMin, yMax;
|
||||||
double pxns, nspx;
|
double pxns, nspx;
|
||||||
|
int64_t vStart, vEnd;
|
||||||
ImVec2 wpos;
|
ImVec2 wpos;
|
||||||
bool hover;
|
bool hover;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user