+ outsourcing
This commit is contained in:
26
gui/gui.py
26
gui/gui.py
@@ -1,4 +1,5 @@
|
|||||||
from gui.utils import nassi, output
|
from gui.utils import nassi, output
|
||||||
|
from gui.new_window_layouts import layout_popup
|
||||||
from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError
|
from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError
|
||||||
from interpreter.NassiShneidermann import OB
|
from interpreter.NassiShneidermann import OB
|
||||||
|
|
||||||
@@ -9,31 +10,6 @@ import secrets
|
|||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# new popup
|
|
||||||
|
|
||||||
|
|
||||||
class layout_popup:
|
|
||||||
def __init__(self):
|
|
||||||
text_column = [
|
|
||||||
[
|
|
||||||
sg.Text('What should the program do if a file already exist?')
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
choices = [
|
|
||||||
[
|
|
||||||
sg.Button(button_text='skip', key='-SKIP-'),
|
|
||||||
sg.Button(button_text='overwrite', key='-OVERWRITE-'),
|
|
||||||
sg.Button(button_text='create expicit name', key='-EXPICIT-'),
|
|
||||||
]
|
|
||||||
]
|
|
||||||
self.layout = [
|
|
||||||
[
|
|
||||||
sg.Column(text_column),
|
|
||||||
sg.Column(choices),
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class Gui:
|
class Gui:
|
||||||
|
|
||||||
|
|||||||
23
gui/new_window_layouts.py
Normal file
23
gui/new_window_layouts.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import PySimpleGUI as sg
|
||||||
|
|
||||||
|
class layout_popup:
|
||||||
|
def __init__(self):
|
||||||
|
text_column = [
|
||||||
|
[
|
||||||
|
sg.Text('What should the program do if a file already exist?')
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
choices = [
|
||||||
|
[
|
||||||
|
sg.Button(button_text='skip', key='-SKIP-'),
|
||||||
|
sg.Button(button_text='overwrite', key='-OVERWRITE-'),
|
||||||
|
sg.Button(button_text='create expicit name', key='-EXPICIT-'),
|
||||||
|
]
|
||||||
|
]
|
||||||
|
self.layout = [
|
||||||
|
[
|
||||||
|
sg.Column(text_column),
|
||||||
|
sg.Column(choices),
|
||||||
|
]
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user