From 08b003670b43563064533ea0b29acee960125d5c Mon Sep 17 00:00:00 2001 From: oleting Date: Sun, 3 Jan 2021 18:27:18 +0100 Subject: [PATCH] + outsourcing --- gui/gui.py | 26 +------------------------- gui/new_window_layouts.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 25 deletions(-) create mode 100644 gui/new_window_layouts.py diff --git a/gui/gui.py b/gui/gui.py index 4029815..5d637d0 100644 --- a/gui/gui.py +++ b/gui/gui.py @@ -1,4 +1,5 @@ from gui.utils import nassi, output +from gui.new_window_layouts import layout_popup from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError from interpreter.NassiShneidermann import OB @@ -9,31 +10,6 @@ import secrets import logging 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: diff --git a/gui/new_window_layouts.py b/gui/new_window_layouts.py new file mode 100644 index 0000000..e3f88a2 --- /dev/null +++ b/gui/new_window_layouts.py @@ -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), + ] + ] \ No newline at end of file