6
6
import sys
7
7
import time
8
8
from imgui .integrations .nx import NXRenderer
9
- from nx .utils import clear_terminal
9
+ from nx .utils import clear_terminal , Terminal
10
10
import traceback
11
11
12
12
sys .argv = ["" ] # workaround needed for runpy
@@ -21,6 +21,7 @@ def colorToFloat(t):
21
21
FOLDER_COLOR = colorToFloat ((230 , 126 , 34 ))
22
22
PYFILE_COLOR = colorToFloat ((46 , 204 , 113 ))
23
23
FILE_COLOR = colorToFloat ((41 , 128 , 185 ))
24
+ APP_COLOR = colorToFloat ((24 , 86 , 31 ))
24
25
25
26
ERROR = ""
26
27
@@ -55,6 +56,8 @@ def main():
55
56
imgui .begin ("" ,
56
57
flags = imgui .WINDOW_NO_TITLE_BAR | imgui .WINDOW_NO_RESIZE | imgui .WINDOW_NO_MOVE | imgui .WINDOW_NO_SAVED_SETTINGS
57
58
)
59
+ imgui .begin_group ()
60
+
58
61
imgui .text ("Welcome to PyNX!" )
59
62
imgui .text ("Touch is supported" )
60
63
imgui .text ("Current dir: " + os .getcwd ())
@@ -92,6 +95,21 @@ def main():
92
95
run_python_module (e )
93
96
94
97
imgui .pop_style_color (1 )
98
+
99
+ imgui .end_group ()
100
+ # end of file picker
101
+
102
+ imgui .same_line (spacing = 50 )
103
+ imgui .begin_group ()
104
+ imgui .text ("Utils:" )
105
+
106
+ imgui .push_style_color (imgui .COLOR_BUTTON , * APP_COLOR )
107
+ if imgui .button ("Interactive Python" , width = 200 , height = 60 ):
108
+ t = Terminal ()
109
+ t .main ()
110
+ imgui .pop_style_color (1 )
111
+
112
+ imgui .end_group ()
95
113
96
114
97
115
imgui .end ()
0 commit comments