[GPU] Translucent trace viewer controls
This commit is contained in:
parent
273a489e2a
commit
e8652e544a
|
@ -223,6 +223,7 @@ void TraceViewer::DrawUI() {
|
|||
void TraceViewer::DrawControllerUI() {
|
||||
ImGui::SetNextWindowPos(ImVec2(5, 5), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(340, 60));
|
||||
ImGui::SetNextWindowBgAlpha(kWindowBgAlpha);
|
||||
if (!ImGui::Begin("Controller", nullptr)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
@ -274,6 +275,7 @@ void TraceViewer::DrawPacketDisassemblerUI() {
|
|||
ImVec2(float(window_->GetActualLogicalWidth()) - 500 - 5, 5),
|
||||
ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(500, 300));
|
||||
ImGui::SetNextWindowBgAlpha(kWindowBgAlpha);
|
||||
if (!ImGui::Begin("Packet Disassembler", nullptr)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
@ -493,6 +495,7 @@ int TraceViewer::RecursiveDrawCommandBufferUI(
|
|||
void TraceViewer::DrawCommandListUI() {
|
||||
ImGui::SetNextWindowPos(ImVec2(5, 70), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(200, 640));
|
||||
ImGui::SetNextWindowBgAlpha(kWindowBgAlpha);
|
||||
if (!ImGui::Begin("Command List", nullptr)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
@ -1106,6 +1109,7 @@ void TraceViewer::DrawStateUI() {
|
|||
ImVec2(float(window_->GetActualLogicalWidth()) - 500 - 5, 30),
|
||||
ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(500, 680));
|
||||
ImGui::SetNextWindowBgAlpha(kWindowBgAlpha);
|
||||
if (!ImGui::Begin("State", nullptr)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
|
|
@ -95,6 +95,11 @@ class TraceViewer : public xe::ui::WindowedApp {
|
|||
kHostDisasm,
|
||||
};
|
||||
|
||||
// Same as for Dear ImGui tooltips. Windows are translucent as the controls
|
||||
// may take a pretty large fraction of the screen, especially on small
|
||||
// screens, so the image from the guest can be seen through them.
|
||||
static constexpr float kWindowBgAlpha = 0.6f;
|
||||
|
||||
bool Load(const std::string_view trace_file_path);
|
||||
|
||||
void DrawUI();
|
||||
|
|
Loading…
Reference in New Issue