Skip to content

Commit

Permalink
window stacking checkbox y values + sounds & music
Browse files Browse the repository at this point in the history
  • Loading branch information
tposejank committed May 26, 2024
1 parent a1d70b1 commit aa8e605
Showing 1 changed file with 78 additions and 20 deletions.
98 changes: 78 additions & 20 deletions psychtobase/src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,81 +188,127 @@ def __init__(self):
sX = int(wid / 2)
sSX = sX + 10

_currentYPos = 100

self.optionsLabel = QLabel("Options", self)
self.optionsLabel.move(sX, 100)
self.optionsLabel.move(sX, _currentYPos)
self.optionsLabel.resize(220, 30)

_currentYPos += 40

self.charts = QCheckBox("Charts", self)
self.charts.move(sX, 140)
self.charts.move(sX, _currentYPos)
self.charts.setToolTip("Select all charts in the \"/data/\" directory of your mod and convert them.")

self.songs = QCheckBox("Songs", self)
self.songs.move(sX, 170)
self.songs.setToolTip("Select all songs in the \"/songs/\" directory of your mod and copy them.")
_currentYPos += 30

self.songs = QCheckBox("Audio", self)
self.songs.move(sX, _currentYPos)
self.songs.setToolTip("Select audio in different directories of your mod and copy them.")

self.songs.stateChanged.connect(self.songsSection)

_currentYPos += 20

self.insts = QCheckBox("Instrumentals", self)
self.insts.move(sSX, 190)
self.insts.move(sSX, _currentYPos)
self.insts.setToolTip("Copy over \"Inst.ogg\" files.")

_currentYPos += 20

self.voices = QCheckBox("Voices", self)
self.voices.move(sSX, 210)
self.voices.move(sSX, _currentYPos)
self.voices.setToolTip("Copy over \"Voices.ogg\" files.")

_currentYPos += 20

# Is available just not for avoiding error :D
self.vocalsplit = QCheckBox("Vocal Split", self)
self.vocalsplit.move(sSX, 230)
self.vocalsplit.move(sSX, _currentYPos)
self.vocalsplit.setToolTip("Splits \"Voices.ogg\" files into two files (\"Voices-opponent.ogg\" and \"Voices-player.ogg\") using their charts. This requires ffmpeg in PATH, and Charts enabled.")

_currentYPos += 20

self.music = QCheckBox("Music", self)
self.music.move(sSX, _currentYPos)
self.music.setToolTip("Copies over files in the \"music\" directory of your mod.")

_currentYPos += 20

self.sounds = QCheckBox("Sounds", self)
self.sounds.move(sSX, _currentYPos)
self.sounds.setToolTip("Copies over files and folders in the \"sounds\" directory of your mod.")

_currentYPos += 40

self.chars = QCheckBox("Characters", self)
self.chars.move(sX, 270)
self.chars.move(sX, _currentYPos)
self.chars.setToolTip("Select all characters in the \"/characters/\" directory of your mod and convert them.")

self.chars.stateChanged.connect(self.characterSection)

_currentYPos += 20

self.icons = QCheckBox("Health Icons", self)
self.icons.move(sSX, 290)
self.icons.move(sSX, _currentYPos)
self.icons.setToolTip("Copies over all of your character icon .png files from the \"/images/icons/\" directory of your mod. This also includes the Freeplay Icons.")

_currentYPos += 20

self.jsons = QCheckBox(".json files", self)
self.jsons.move(sSX, 310)
self.jsons.move(sSX, _currentYPos)
self.jsons.setToolTip("Converts your character's .json files to the appropiate format.")

_currentYPos += 20

self.charassets = QCheckBox("Assets", self)
self.charassets.move(sSX, 330)
self.charassets.move(sSX, _currentYPos)
self.charassets.setToolTip("Copies over your .png and .xml files from the \"/images/characters/\" directory of your mod.")

_currentYPos += 40

self.weeks = QCheckBox("Weeks", self)
self.weeks.move(sX, 370)
self.weeks.move(sX, _currentYPos)
self.weeks.setToolTip("Select week conversions.")

self.weeks.stateChanged.connect(self.weekSection)

_currentYPos += 20

self.props = QCheckBox("Menu Characters (Props)", self)
self.props.move(sSX, 390)
self.props.move(sSX, _currentYPos)
self.props.resize(400, 30)
self.props.setToolTip("Converts your menu character .json files from the \"/images/menucharacters/\" directory of your mod to the appropiate format.")

_currentYPos += 20

self.titles = QCheckBox("Week Images (Titles)", self)
self.titles.move(sSX, 410)
self.titles.move(sSX, _currentYPos)
self.titles.resize(400, 30)
self.titles.setToolTip("Copies over your .png files from the \"/images/storymenu/\" directory of your mod.")

_currentYPos += 20

self.levels = QCheckBox("Levels", self)
self.levels.move(sSX, 430)
self.levels.move(sSX, _currentYPos)
self.levels.setToolTip("Converts your week .json files from the \"/weeks/\" directory of your mod to the appropiate format.")

_currentYPos += 40

self.stages = QCheckBox("Stages", self)
self.stages.move(sX, 470)
self.stages.move(sX, _currentYPos)
self.stages.setToolTip("Converts stage .jsons from the \"/stages/\" directory of your mod and parses the .lua files to asign props.")

_currentYPos += 30

self.meta = QCheckBox("Pack Meta", self)
self.meta.move(sX, 500)
self.meta.move(sX, _currentYPos)
self.meta.setToolTip("Converts your \"pack.json\" to the appropiate format, and copies your \"pack.png\" file.")

_currentYPos += 30

self.images = QCheckBox("Images", self)
self.images.move(sX, 530)
self.images.move(sX, _currentYPos)
self.images.setToolTip("Copies over your .png and .xml files from the \"/images/\" directory of your mod.")

self.convert = QPushButton("Convert", self)
Expand All @@ -277,6 +323,8 @@ def allToDefaults(self, checked = True, enabled = False):
self.insts.setChecked(checked)
self.voices.setChecked(checked)
self.vocalsplit.setChecked(checked == _vocalSplitEnabledByDefault and checked != False)
self.music.setChecked(checked)
self.sounds.setChecked(checked)
self.chars.setChecked(checked)
self.icons.setChecked(checked)
self.jsons.setChecked(checked)
Expand All @@ -293,6 +341,8 @@ def allToDefaults(self, checked = True, enabled = False):
self.insts.setEnabled(enabled)
self.voices.setEnabled(enabled)
self.vocalsplit.setEnabled(enabled)
self.music.setEnabled(enabled)
self.sounds.setEnabled(enabled)
self.chars.setEnabled(enabled)
self.icons.setEnabled(enabled)
self.jsons.setEnabled(enabled)
Expand Down Expand Up @@ -325,6 +375,8 @@ def radioCheck(self, check, default = False):
self.insts.setChecked(True)
self.voices.setChecked(True)
self.vocalsplit.setChecked(_vocalSplitEnabledByDefault)
self.music.setChecked(True)
self.sounds.setChecked(True)
if self.sender() == self.onlyChars:
self.allToDefaults(False)

Expand All @@ -347,10 +399,14 @@ def songsSection(self, state):
self.insts.setEnabled(True)
self.voices.setEnabled(True)
self.vocalsplit.setEnabled(_vocalSplitEnabledByDefault)
self.sounds.setEnabled(True)
self.music.setEnabled(True)
elif state == 0: # Unchecked
self.insts.setEnabled(False)
self.voices.setEnabled(False)
self.vocalsplit.setEnabled(False)
self.sounds.setEnabled(False)
self.music.setEnabled(False)

def characterSection(self, state):
if state == 2: # Checked
Expand Down Expand Up @@ -390,10 +446,12 @@ def convertCallback(self, what):
options = Constants.DEFAULT_OPTIONS
options['charts'] = self.charts.isChecked()
if self.songs.isChecked():
logging.info('Songs will be converted')
logging.info('Audio will be converted')
options['songs']['inst'] = self.insts.isChecked()
options['songs']['voices'] = self.voices.isChecked()
options['songs']['split'] = self.vocalsplit.isChecked()
options['songs']['music'] = self.music.isChecked()
options['songs']['sounds'] = self.sounds.isChecked()
if self.chars.isChecked():
logging.info('Characters will be converted')
options['characters']['json'] = self.jsons.isChecked()
Expand Down

0 comments on commit aa8e605

Please sign in to comment.