mirror of
https://github.com/nixietab/picodulce.git
synced 2025-04-10 10:28:56 +01:00
Compare commits
4 Commits
1e03c986fd
...
dc81d4285d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dc81d4285d | ||
![]() |
87fc6e9842 | ||
![]() |
c59516fc60 | ||
![]() |
83d59a6600 |
14
marroc.py
14
marroc.py
@ -62,6 +62,20 @@ class ModrinthSearchApp(QWidget):
|
|||||||
|
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
|
def keyPressEvent(self, event):
|
||||||
|
focus_widget = self.focusWidget()
|
||||||
|
if event.key() == Qt.Key_Down:
|
||||||
|
self.focusNextChild() # Move focus to the next widget
|
||||||
|
elif event.key() == Qt.Key_Up:
|
||||||
|
self.focusPreviousChild() # Move focus to the previous widget
|
||||||
|
elif event.key() in [Qt.Key_Return, Qt.Key_Enter]:
|
||||||
|
if isinstance(focus_widget, QPushButton):
|
||||||
|
focus_widget.click() # Trigger the button click
|
||||||
|
elif isinstance(focus_widget, QComboBox):
|
||||||
|
focus_widget.showPopup() # Show dropdown for combo box
|
||||||
|
else:
|
||||||
|
super().keyPressEvent(event)
|
||||||
|
|
||||||
def ensure_directories_exist(self):
|
def ensure_directories_exist(self):
|
||||||
directories = ["marroc/mods", "marroc/resourcepacks"]
|
directories = ["marroc/mods", "marroc/resourcepacks"]
|
||||||
for directory in directories:
|
for directory in directories:
|
||||||
|
18
picodulce.py
18
picodulce.py
@ -114,6 +114,20 @@ class PicomcVersionSelector(QWidget):
|
|||||||
|
|
||||||
self.setLayout(main_layout)
|
self.setLayout(main_layout)
|
||||||
|
|
||||||
|
def keyPressEvent(self, event):
|
||||||
|
focus_widget = self.focusWidget()
|
||||||
|
if event.key() == Qt.Key_Down:
|
||||||
|
self.focusNextChild() # Move focus to the next widget
|
||||||
|
elif event.key() == Qt.Key_Up:
|
||||||
|
self.focusPreviousChild() # Move focus to the previous widget
|
||||||
|
elif event.key() in [Qt.Key_Return, Qt.Key_Enter]:
|
||||||
|
if isinstance(focus_widget, QPushButton):
|
||||||
|
focus_widget.click() # Trigger the button click
|
||||||
|
elif isinstance(focus_widget, QComboBox):
|
||||||
|
focus_widget.showPopup() # Show dropdown for combo box
|
||||||
|
else:
|
||||||
|
super().keyPressEvent(event)
|
||||||
|
|
||||||
def check_config_file(self):
|
def check_config_file(self):
|
||||||
config_path = "config.json"
|
config_path = "config.json"
|
||||||
default_config = {
|
default_config = {
|
||||||
@ -149,7 +163,7 @@ class PicomcVersionSelector(QWidget):
|
|||||||
layout.addWidget(title_label)
|
layout.addWidget(title_label)
|
||||||
|
|
||||||
# Create checkboxes
|
# Create checkboxes
|
||||||
discord_rcp_checkbox = QCheckBox('Discord RCP')
|
discord_rcp_checkbox = QCheckBox('Discord RPC')
|
||||||
discord_rcp_checkbox.setChecked(self.config.get("IsRCPenabled", False))
|
discord_rcp_checkbox.setChecked(self.config.get("IsRCPenabled", False))
|
||||||
check_updates_checkbox = QCheckBox('Check Updates on Start')
|
check_updates_checkbox = QCheckBox('Check Updates on Start')
|
||||||
check_updates_checkbox.setChecked(self.config.get("CheckUpdate", False))
|
check_updates_checkbox.setChecked(self.config.get("CheckUpdate", False))
|
||||||
@ -1071,6 +1085,8 @@ class ModLoaderAndVersionMenu(QDialog):
|
|||||||
logging.error(error_message)
|
logging.error(error_message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
current_date = datetime.now()
|
current_date = datetime.now()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.9.9.8",
|
"version": "0.9.9.9",
|
||||||
"links": [
|
"links": [
|
||||||
"https://raw.githubusercontent.com/nixietab/picodulce/main/version.json",
|
"https://raw.githubusercontent.com/nixietab/picodulce/main/version.json",
|
||||||
"https://raw.githubusercontent.com/nixietab/picodulce/main/picodulce.py",
|
"https://raw.githubusercontent.com/nixietab/picodulce/main/picodulce.py",
|
||||||
|
Loading…
Reference in New Issue
Block a user