Register and disassembly view now separated in different tabs
This commit is contained in:
@@ -67,7 +67,10 @@ void InstructionFunc(s64, Disassembler::DisassemblyResult& disasm) {
|
||||
}
|
||||
|
||||
void Debugger::RegisterView() {
|
||||
if(!ImGui::BeginTable("Registers", 4, ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_ContextMenuInBody))
|
||||
if(!ImGui::BeginTabItem("Registers"))
|
||||
return;
|
||||
|
||||
if(!ImGui::BeginTable("##regs", 4, ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_ContextMenuInBody))
|
||||
return;
|
||||
|
||||
ImGui::TableSetupColumn("Name");
|
||||
@@ -140,6 +143,7 @@ void Debugger::RegisterView() {
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
bool Debugger::render() {
|
||||
@@ -178,10 +182,25 @@ bool Debugger::render() {
|
||||
core.ToggleBreakpoint(startAddr);
|
||||
}
|
||||
|
||||
if(!ImGui::BeginTabBar("##debuggerTabs")) {
|
||||
ImGui::EndTabBar();
|
||||
ImGui::End();
|
||||
return false;
|
||||
}
|
||||
|
||||
RegisterView();
|
||||
|
||||
if(!ImGui::BeginTabItem("MIPS R4300i code view")) {
|
||||
ImGui::EndTabBar();
|
||||
ImGui::End();
|
||||
return false;
|
||||
}
|
||||
|
||||
constexpr auto disasmTableFlags = ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersOuter |
|
||||
ImGuiTableFlags_BordersV | ImGuiTableFlags_ContextMenuInBody;
|
||||
|
||||
if(!ImGui::BeginTable("Disassembly", columns.size(), disasmTableFlags)) {
|
||||
ImGui::EndTabBar();
|
||||
ImGui::End();
|
||||
return false;
|
||||
}
|
||||
@@ -222,7 +241,8 @@ bool Debugger::render() {
|
||||
|
||||
ImGui::EndTable();
|
||||
|
||||
RegisterView();
|
||||
ImGui::EndTabItem();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user