Skip to content

Commit

Permalink
loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Adog64 committed Mar 27, 2021
1 parent a5b13d8 commit 98edd37
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 12 deletions.
Binary file modified __pycache__/launcher.cpython-38.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from cx_Freeze import setup, Executable

build_exe_options = {"packages":["src"], "excludes":["zmq", "h5py", "tkinter"], "optimize":0, "build_exe":"C:/Users/Sharpe/Desktop/build"}
build_exe_options = {"packages":["src"], "includes":['numpy', 'matplotlib', 'spotipy', 'pygame', 'pyTwistyScrambler'], "optimize":2, "build_exe":"C:/Users/Sharpe/Desktop/build"}

setup(name="Lotus Timer",
version='2021.03.25.1',
version='2021.3.26.1',
author='Aidan Sharpe',
options={"build_exe":build_exe_options},
executables=[Executable("launcher.py", base="Win32GUI", target_name="LotusTimer")])
executables=[Executable("launcher.py", target_name="LotusTimer")])
Binary file modified src/__pycache__/components.cpython-38.pyc
Binary file not shown.
Binary file modified src/__pycache__/main.cpython-38.pyc
Binary file not shown.
Binary file modified src/__pycache__/util.cpython-38.pyc
Binary file not shown.
Binary file removed src/assets/DECO.TTF
Binary file not shown.
Binary file removed src/assets/PRICEDOWN.TTF
Binary file not shown.
2 changes: 1 addition & 1 deletion src/assets/session_data.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/assets/session_data_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"session1": [], "session2": [], "session3": [], "session4": [], "session5": [], "session6": [], "session7": [], "session8": [], "session9": [], "session10": [], "session11": [], "session12": [], "session13": [], "session14": [], "session15": [], "properties": {"sessionData": "{\"1\":{\"name\":\"1\",\"opt\":{},\"rank\":1,\"stat\":[0,0,-1],\"date\":[null,null]},\"2\":{\"name\":2,\"opt\":{},\"rank\":2,\"stat\":[0,0,-1],\"date\":[null,null]},\"3\":{\"name\":3,\"opt\":{\"scrType\":\"2gen\"},\"rank\":3,\"stat\":[0,0,-1],\"date\":[null,null]},\"4\":{\"name\":4,\"opt\":{\"scrType\":\"444wca\"},\"rank\":4,\"stat\":[0,0,-1],\"date\":[null,null]},\"5\":{\"name\":5,\"opt\":{},\"rank\":5,\"stat\":[0,0,-1],\"date\":[null,null]},\"6\":{\"name\":6,\"opt\":{\"scrType\":\"sqrs\"},\"rank\":6,\"stat\":[0,0,-1],\"date\":[null,null]},\"7\":{\"name\":7,\"opt\":{\"scrType\":\"mgmp\"},\"rank\":7,\"stat\":[0,0,-1],\"date\":[null,null]},\"8\":{\"name\":8,\"opt\":{\"scrType\":\"pyrso\"},\"rank\":8,\"stat\":[0,0,-1],\"date\":[null,null]},\"9\":{\"name\":9,\"opt\":{\"scrType\":\"skbso\"},\"rank\":9,\"stat\":[0,0,-1],\"date\":[null,null]},\"10\":{\"name\":10,\"opt\":{},\"rank\":10},\"11\":{\"name\":11,\"opt\":{},\"rank\":11},\"12\":{\"name\":12,\"opt\":{},\"rank\":12,\"stat\":[0,0,-1],\"date\":[null,null]},\"13\":{\"name\":13,\"opt\":{},\"rank\":13},\"14\":{\"name\":14,\"opt\":{},\"rank\":14},\"15\":{\"name\":15,\"opt\":{},\"rank\":15}}"}}
2 changes: 1 addition & 1 deletion src/assets/timer_options.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"theme":"default",
"background_mode":"image",
"background_mode":"solid",
"background_image":"cubehead.png"
}
2 changes: 1 addition & 1 deletion src/components.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pygame
from src.settings import *
from .settings import *
from collections.abc import Iterable
import numpy as np
import matplotlib
Expand Down
16 changes: 11 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import sys
from pygame.locals import *
from random import randint
from src.settings import *
from src.components import *
from src.util import *
from .settings import *
from .components import *
from .util import *
import json
import time

Expand Down Expand Up @@ -36,6 +36,7 @@ def __init__(self):
self.title_font = pg.font.Font(self.assets + title_font, TITLE_FONT_SIZE)
self.subtitle_font = pg.font.Font(self.theme_path + text_font, 30)
self.text_font = pg.font.Font(self.theme_path + text_font, 25)
self.loading_screen()
self.init_sessions()
self.running = True
self.timec = len(self.session.get_times())
Expand Down Expand Up @@ -76,7 +77,7 @@ def process_inputs(self):
def screens(self):
self.timer_screen = {
'ControlPanel': Box(control_panel_center, control_panel_size, visible=True, fill_color=box_fill_color),
'Scramble': Label(scramble_center, scramble_size,self.text_font, text_color, text=self.current_scramble, enabled=True),
'Scramble': Label(scramble_center, scramble_size, self.text_font, text_color, text=self.current_scramble, enabled=True),
'Time': TextBox(self.subtitle_font, text_color, center=time_center, size=time_size, enterable=True, bordered=True, is_valid_entry=self.valid_time),
'Logo': Image(logo_center, logo_size, self.logo),
'LogoText': Label(logo_text_center, logo_text_size, self.title_font, lotus_purple, text='Lotus', scaling=True),
Expand All @@ -99,14 +100,19 @@ def draw(self):
else:
self.window.fill((0,0,0))


#render components
self.screen.render(self.window)
pg.display.update()
#check scramble queue
if self.session.queue_ready:
self.session.add_to_queue()

def loading_screen(self):
self.window.fill(box_fill_color)
Image((window_width/2, window_height/2), logo_size, self.logo).render(self.window)
#Label((window_width/2, window_height/2 + logo_size[1] + 25), logo_text_size, self.title_font, lotus_purple, "Loading User Data...").render(self.window)
pg.display.update()

def theme_init(self, path):
global background_color, text_color, border_color, box_fill_color
opts = json.loads(open(path).read())
Expand Down
2 changes: 1 addition & 1 deletion src/util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from src.settings import *
from .settings import *
import json
import configparser
import spotipy
Expand Down

0 comments on commit 98edd37

Please sign in to comment.