fixing multi frame switching

This commit is contained in:
2022-08-30 13:51:50 +02:00
parent e85b021383
commit 746b40fa18
6 changed files with 43 additions and 16 deletions

View File

@@ -2,5 +2,5 @@ from enum import Enum
class Frames(Enum):
Home = 1
Info = 2
Home = 1 # Home view
Info = 2 # Info & copyright view

View File

@@ -1,4 +1,3 @@
from controller.Frames import Frames
class MainController:
@@ -8,20 +7,24 @@ class MainController:
desc...
"""
# Variables
view = None
__view = None
# Constructor
def __init__(self) -> None:
pass
def change_frame(self, frame: Frames.value) -> None:
def change_frame(self, frame) -> None:
"""
[function for controller]
:frame: -> The frame to be displayed on the screen.
"""
pass
def set_view(self, view) -> None:
"""
[function for view]
:view: -> The view that this controller manage.
"""
self.view = view
self.__view = view