-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
40 lines (35 loc) · 1.24 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import numpy as np
import pygame
import tkinter as tk
from tkinter import messagebox
from screeninfo import get_monitors
from sys import argv
# Tkinter start
root = tk.Tk()
root.withdraw()
root.iconphoto(False, tk.PhotoImage(file="img/icon_32.png"))
# Essentially global variables.
# Allow for windowed and full-screen modes
monitor_1 = get_monitors()[0]
if len(argv) > 1 and argv[1] == "f":
SCREEN_DIMS = [monitor_1.width, monitor_1.height]
GRID_PX_DIMS = [monitor_1.height, monitor_1.height]
WINDOW_CONST = pygame.FULLSCREEN
elif len(argv) > 1 and argv[1] == "w":
SCREEN_DIMS = [1024, 768]
GRID_PX_DIMS = [768, 768]
WINDOW_CONST = pygame.RESIZABLE
else:
fullscreen = messagebox.askyesno("Room Designer - View Mode", "Would you like to run the program in full screen?")
if fullscreen:
SCREEN_DIMS = [monitor_1.width, monitor_1.height]
GRID_PX_DIMS = [monitor_1.height, monitor_1.height]
WINDOW_CONST = pygame.FULLSCREEN
else:
SCREEN_DIMS = [1024, 768]
GRID_PX_DIMS = [768, 768]
WINDOW_CONST = pygame.RESIZABLE
# Space dimensions of grid
GRID_DIMS = [20, 20]
# Speech credentials file path
SPEECH_CRED_FILE = "../../Dropbox/College/2019-2020/6.835/Project/6835-95e43858e35a.json"