WIP
This commit is contained in:
@@ -88,6 +88,7 @@ void RegWindow::draw(const Frontend &frontend)
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: formatting options
|
||||
switch (reg.bytes.size())
|
||||
{
|
||||
case 1: std::snprintf(buf, sizeof(buf), "%X", reg.bytes[0]); break;
|
||||
@@ -109,7 +110,24 @@ void RegWindow::draw(const Frontend &frontend)
|
||||
default: std::snprintf(buf, sizeof(buf), "<val too large>"); break;
|
||||
}
|
||||
|
||||
ImGui::PushID(set_idx * 1000 + i);
|
||||
ImGui::Text(buf);
|
||||
if (ImGui::IsItemHovered()
|
||||
&& ImGui::IsMouseClicked(ImGuiMouseButton_Right))
|
||||
{
|
||||
ImGui::OpenPopup("Context");
|
||||
}
|
||||
|
||||
if (ImGui::BeginPopup("Context"))
|
||||
{
|
||||
if (ImGui::Selectable("Copy"))
|
||||
{
|
||||
ImGui::SetClipboardText(buf);
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user