summaryrefslogtreecommitdiff
path: root/my_imgui_widgets.cpp
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-08-04 12:33:54 -0400
committerFox Caminiti <fox@foxcam.net>2022-08-04 12:33:54 -0400
commitbccb1d61907fea45c5e84b29499989f7cee104a5 (patch)
tree8e70ecab3bce134d2b5100cfd67f37dee2dccda3 /my_imgui_widgets.cpp
parent8875d0226f0d38a1e5ef946e56cd15810627f5ac (diff)
loaded bitmap wrap buffer seems stable
Diffstat (limited to 'my_imgui_widgets.cpp')
-rw-r--r--my_imgui_widgets.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/my_imgui_widgets.cpp b/my_imgui_widgets.cpp
index f93866a..b4114e7 100644
--- a/my_imgui_widgets.cpp
+++ b/my_imgui_widgets.cpp
@@ -98,6 +98,14 @@ ImGui_DebugMemoryViewer(project_data *File, memory *Memory)
ImVec2 Max = ImVec2(Min.x + 2, ViewportMax.y);
draw_list->AddLine(Min, Max, LineColor);
}
+ // CurrentPosition line
+ {
+ uint32 LineColor = IM_COL32(000, 100, 200, 200);
+ real32 CurPosMB = (real32)Table->CurrentPosition/1024/1024;
+ ImVec2 Min = ImVec2(ViewportMin.x + (CurPosMB/IncrementMB * ScreenIncrement), ViewportMin.y);
+ ImVec2 Max = ImVec2(Min.x + 2, ViewportMax.y);
+ draw_list->AddLine(Min, Max, LineColor);
+ }
for (uint32 i = 0; i < Table->NumberOfPointers; i++) {
if (Memory->Bitmap[i].SourceOwner) {
@@ -117,7 +125,7 @@ ImGui_DebugMemoryViewer(project_data *File, memory *Memory)
ImVec4 col = ImColor::HSV(Pos, 0.3, 0.6, 1.0f);
uint64 BitmapSize = Bitmap_CalcTotalBytes(Source->Info.Width, Source->Info.Height, Source->Info.BytesPerPixel);
- if (BitmapSize > BytesBetween) {
+ if (BitmapSize > BytesBetween && i != Table->NumberOfPointers - 1) {
col = ImColor::HSV(Pos, 1.0, 1.0, 1.0f);
}
@@ -135,7 +143,9 @@ ImGui_DebugMemoryViewer(project_data *File, memory *Memory)
ImGui::PopStyleColor();
if (ImGui::IsItemHovered()) {
char buf[1024];
- sprintf(buf, "Source owner: %s\nSize: %.02f MB\n Frame number: %i", Memory->Bitmap[i].SourceOwner->Path, SizeReal, Memory->Bitmap[i].Frame);
+ sprintf(buf, "Source owner: %s\nSize: %.02f MB\n Frame number: %i\n Index: %i",
+ Memory->Bitmap[i].SourceOwner->Path, SizeReal,
+ Memory->Bitmap[i].Frame, i);
ImGui::BeginTooltip();
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
ImGui::TextUnformatted(buf);
@@ -147,6 +157,11 @@ ImGui_DebugMemoryViewer(project_data *File, memory *Memory)
// draw_list->AddRectFilled(Min, Max, IM_COL32(200, 200, 200, 255));
}
}
+ ImGui::SetCursorScreenPos(ImVec2(ViewportMin.x, ViewportMax.y - CubeHeight*2));
+ char buf[1024];
+ sprintf(buf, "Current index: %i\nAmount of pointers: %i",
+ Table->PointerIndex, Table->NumberOfPointers);
+ ImGui::Text(buf);
ImGui::End();
}
@@ -544,7 +559,7 @@ ImGui_Timeline(project_data *File, project_state *State, memory *Memory, ui *UI,
ImGui::BeginChild("Topbar", TopbarSize, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar);
- ImGui::Text
+ // ImGui::Text
/*
ImGui::Button("V", TopbarButtonSize); ImGui::SameLine();
ImGui::Button("V", TopbarButtonSize); ImGui::SameLine();