blob: 8ffc764c749bd9caea6dfcab9fdeff2ad57885fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package gui
import cpu.Cpu
import glm_.vec2.Vec2
import imgui.Cond
import imgui.ImGui
fun paintRunControlWindow(cpu: Cpu) {
with(ImGui) {
setNextWindowPos(Vec2(20, 410), Cond.FirstUseEver)
begin("Run control")
text("Current op:")
separator()
if(cpu.currentOp != null) {
text(cpu.currentOp!!.name)
}
else {
text("None")
}
newLine()
text("Next op:")
separator()
if(cpu.nextOp != null) {
text(cpu.nextOp!!.name)
}
else {
text("None")
}
newLine()
text("Control:")
separator()
if(button("Step")) {
cpu.executeNextInstruction()
}
end()
}
}
|