Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions jes_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from jes_button import Button
import time
import numpy as np
import math
import os
import random

class UI:
Expand All @@ -15,9 +15,13 @@ def __init__(self, _W_W, _W_H, _MOVIE_SINGLE_DIM, _GRAPH_COOR, _SAC_COOR, _GENEA
self.sliderList = []
self.buttonList = []
pygame.font.init()
self.bigFont = pygame.font.Font('C:/Users/caryk/AppData/Local/Microsoft/Windows/Fonts/Jygquip 1.ttf', 60)
self.smallFont = pygame.font.Font('C:/Users/caryk/AppData/Local/Microsoft/Windows/Fonts/Jygquip 1.ttf', 30)
self.tinyFont = pygame.font.Font('C:/Users/caryk/AppData/Local/Microsoft/Windows/Fonts/Jygquip 1.ttf', 21)
appdata = os.getenv('APPDATA')
font = f'{appdata}/Local/Microsoft/Windows/Fonts/Jygquip 1.ttf' # If a user has the custom font installed, it will now work!
if not os.path.isfile(font):
font = './visuals/FRAMDCN.TTF' # fits a bit better than the old typeface
self.bigFont = pygame.font.Font(font, 60)
self.smallFont = pygame.font.Font(font, 30)
self.tinyFont = pygame.font.Font(font, 21)
self.BACKGROUND_PIC = pygame.image.load("visuals/background.png")
self.W_W = _W_W
self.W_H = _W_H
Expand Down Expand Up @@ -331,7 +335,7 @@ def doMovies(self):
if self.sample_frames >= self.sim.trial_time+self.SAMPLE_FREEZE_TIME:
self.startSampleHelper()
for i in range(L):
if self.visualSimMemory[i][2] < self.sim.trial_time:
if self.visualSimMemory[i][2] < self.sim.trial_time:
self.visualSimMemory[i] = self.sim.simulateRun(self.visualSimMemory[i], 1, False)
DIM = arrayIntMultiply(self.MOVIE_SINGLE_DIM, MSCALE[self.CLH[0]])
self.movieScreens[i] = pygame.Surface(DIM, pygame.SRCALPHA, 32)
Expand Down
Binary file removed visuals/Arial.ttf
Binary file not shown.
Binary file added visuals/FRAMDCN.TTF
Binary file not shown.