Added disassembly component.

This commit is contained in:
2026-06-18 07:40:23 +02:00
parent 19f4593e0e
commit 350a26d1b9
5 changed files with 207 additions and 32 deletions
+10 -3
View File
@@ -18,16 +18,23 @@ gui_bottom_tabs :: proc(rect: rl.Rectangle, sim: ^Simulator) {
// inside draw loop:
rl.GuiTabBar(tab_bar_rect, &tabs[0], i32(len(tabs)), &sim.active_tab)
bounds := rl.Rectangle {
memory_view_bounds := rl.Rectangle {
x = rect.x + PADDING_X,
y = rect.y + PADDING_Y + tab_bar_rect.height,
width = rect.width - (PADDING_X * 2),
width = (rect.width - (PADDING_X * 2)) / 2,
height = rect.height - (PADDING_Y * 2) - tab_bar_rect.height,
}
disasm_view_bounds := rl.Rectangle {
x = rect.x + memory_view_bounds.width + PADDING_X,
y = rect.y + PADDING_Y + tab_bar_rect.height,
width = (rect.width - (PADDING_X * 2)) / 2,
height = rect.height - (PADDING_Y * 2) - tab_bar_rect.height,
}
switch sim.active_tab {
case 0: // draw registers panel
gui_tab_memory(bounds, sim)
gui_tab_memory(memory_view_bounds, sim)
gui_tab_disasm(disasm_view_bounds, sim)
case 1: // draw memory panel
case 2: // draw display panel
}