Added disassembly component.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user