@@ -17,7 +17,7 @@ var identifier := "a"
1717var main_gui : Gui
1818## Default arrow color. The length has to be 4, else ImGui will crash the application
1919## without any error whatsoever.
20- var color = [0.0 , 0.0 , 0.0 , 1.0 ]
20+ var color = [randf (), randf (), randf () , 1.0 ]
2121var gates : Array [GateGui ] = []
2222
2323var _init_mouse_pos := Vector2 ()
@@ -32,9 +32,10 @@ func _init(main_gui: Gui) -> void:
3232func gui ():
3333 ImGui .BeginChild ("qubit_gui_" + str (bit_index ), Vector2 (0 , 0 ), ImGui .ChildFlags_AutoResizeY )
3434
35- # Identifier text
36- ImGui .AlignTextToFramePadding ()
37- ImGui .Text ("|" + identifier + ">" )
35+ # ImGui.AlignTextToFramePadding()
36+ if ImGui .Button ("Del" ):
37+ removed .emit ()
38+ main_gui .remove_qubit (self )
3839 ImGui .SameLine ()
3940
4041 if ImGui .ColorButton ("##arrow_color_button" , Color (color [0 ], color [1 ], color [2 ], color [3 ])):
@@ -49,14 +50,9 @@ func gui():
4950 # Complex number 2
5051 ImGui .PushItemWidth (160 )
5152
52- if ImGui .Button ("Del" ):
53- removed .emit ()
54- main_gui .remove_qubit (self )
55- ImGui .SameLine ()
56-
5753 # ImGui is a piece of shit, but oddly, it's really useful sometimes
5854 # (I still love it tho)
59- ImGui .SetCursorPosX (56 )
55+ ImGui .SetCursorPosX (64 )
6056 if ImGui .InputText ("##text_2" , text2 , 80 ):
6157 _on_qubit_change ()
6258
0 commit comments