Skip to content

Commit

Permalink
Touch up user experience
Browse files Browse the repository at this point in the history
  • Loading branch information
nirgoren committed Dec 12, 2021
1 parent b68d190 commit 2402df1
Show file tree
Hide file tree
Showing 38 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ copy vcontroller\x64\Release\vcontroller.dll dist\Eddienput\vcontroller.dll
copy src\icon.ico dist\Eddienput\icon.ico
copy src\config.json dist\Eddienput\config.json
copy src\eddienput_controller.png dist\Eddienput\eddienput_controller.png
Xcopy /E /I configs dist\Eddienput\configs
Xcopy /E /I playbacks dist\Eddienput\playbacks
Xcopy /E /I rec_configs dist\Eddienput\rec_configs
Xcopy /E /I src\configs dist\Eddienput\configs
Xcopy /E /I src\playbacks dist\Eddienput\playbacks
Xcopy /E /I src\rec_configs dist\Eddienput\rec_configs
Xcopy /E /I src\sounds dist\Eddienput\sounds
copy LICENSE dist\Eddienput\LICENSE
copy README.md dist\Eddienput\README.md
Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"playback": "playbacks\\gg_test.txt",
"playback": "playbacks\\recording.txt",
"playback_start_end_sound": "true",
"side": "P2",
"hot_reload": "true",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions src/gui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os

from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QVBoxLayout, QLabel, QTextEdit, QHBoxLayout, \
Expand Down Expand Up @@ -273,19 +274,20 @@ def set_rec_config_file(file_path):


def choose_playbacks_file():
file_path = choose_file()
file_path = choose_file(filter='*.txt', directory=os.getcwd() + '\\playbacks')
set_playback_file(file_path)


def choose_rec_config_file():
file_path = choose_file()
file_path = choose_file(filter='*.json', directory=os.getcwd() + '\\rec_configs')
set_rec_config_file(file_path)


def choose_file():
def choose_file(filter, directory):
dlg = QFileDialog()
dlg.setFileMode(QFileDialog.AnyFile)
dlg.setDirectory('')
dlg.setFileMode(QFileDialog.ExistingFile)
dlg.setNameFilter(filter)
dlg.setDirectory(directory)
if dlg.exec_():
filenames = dlg.selectedFiles()
return filenames[0]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/playbacks/recording.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configs/universal.json
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def record(symbol_map: dict, direction_index: int):
parsed_frames.append(parsed_frame)

# Compress empty frames
parsed_frames = parsed_frames[1:]
while not parsed_frames[0]:
parsed_frames = parsed_frames[1:]
compressed_frames = []
empty_frames_count = 0
for frame in parsed_frames:
Expand Down
2 changes: 0 additions & 2 deletions src/recording.txt

This file was deleted.

0 comments on commit 2402df1

Please sign in to comment.