PaiGramMetadata/main.py

35 lines
809 B
Python
Raw Normal View History

2023-05-10 14:05:06 +00:00
import flet as ft
from src.choose import choose_view
from src.data import Page
from src.edit import edit_view
def main(page: Page):
def on_route_change(e: Page):
page.views.clear()
choose_view(page)
if e.route == "/edit":
edit_view(page)
page.update()
def view_pop():
page.views.pop()
top_view = page.views[-1]
page.go(top_view.route)
2023-08-14 07:40:58 +00:00
page.title = "FightPropRuleEditor"
2023-05-10 14:05:06 +00:00
page.vertical_alignment = "center"
page.horizontal_alignment = "center"
page.on_route_change = on_route_change
page.on_view_pop = view_pop
page.window_min_width = 800
page.window_width = 800
page.window_height = 600
page.window_min_height = 600
page.go(page.route)
if __name__ == "__main__":
ft.app(target=main)