mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
add toggle for update check
This commit is contained in:
parent
f492e3fdab
commit
2573d04ce8
@ -47,6 +47,7 @@ class EyeTrackSettingsConfig(BaseModel):
|
|||||||
gui_BLOBP: int = 4
|
gui_BLOBP: int = 4
|
||||||
gui_skip_autoradius: bool = True
|
gui_skip_autoradius: bool = True
|
||||||
gui_thresh_add: int = 20
|
gui_thresh_add: int = 20
|
||||||
|
gui_update_check: bool = True
|
||||||
|
|
||||||
class EyeTrackConfig(BaseModel):
|
class EyeTrackConfig(BaseModel):
|
||||||
version: int = 1
|
version: int = 1
|
||||||
|
|||||||
@ -50,7 +50,7 @@ def main():
|
|||||||
|
|
||||||
# Check to see if we can connect to our video source first. If not, bring up camera finding
|
# Check to see if we can connect to our video source first. If not, bring up camera finding
|
||||||
# dialog.
|
# dialog.
|
||||||
|
if config.settings.gui_update_check:
|
||||||
print("\033[95m[INFO] Checking for updates...\033[0m")
|
print("\033[95m[INFO] Checking for updates...\033[0m")
|
||||||
url = "https://raw.githubusercontent.com/RedHawk989/EyeTrackVR-Installer/master/Version-Data/Version_Num.txt"
|
url = "https://raw.githubusercontent.com/RedHawk989/EyeTrackVR-Installer/master/Version-Data/Version_Num.txt"
|
||||||
html = urlopen(url).read()
|
html = urlopen(url).read()
|
||||||
|
|||||||
@ -39,6 +39,7 @@ class SettingsWidget:
|
|||||||
self.gui_BLOBP = f"-BLOBP{widget_id}-"
|
self.gui_BLOBP = f"-BLOBP{widget_id}-"
|
||||||
self.gui_thresh_add = f"-THRESHADD{widget_id}-"
|
self.gui_thresh_add = f"-THRESHADD{widget_id}-"
|
||||||
|
|
||||||
|
self.gui_update_check = f"-UPDATECHECK{widget_id}-"
|
||||||
self.gui_threshold_slider = f"-BLOBTHRESHOLD{widget_id}-"
|
self.gui_threshold_slider = f"-BLOBTHRESHOLD{widget_id}-"
|
||||||
self.main_config = main_config
|
self.main_config = main_config
|
||||||
self.config = main_config.settings
|
self.config = main_config.settings
|
||||||
@ -88,6 +89,15 @@ class SettingsWidget:
|
|||||||
tooltip = "Only send a blink to VRC if both eyes are closed.",
|
tooltip = "Only send a blink to VRC if both eyes are closed.",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
[sg.Checkbox(
|
||||||
|
"Check For Updates",
|
||||||
|
default=self.config.gui_update_check,
|
||||||
|
key=self.gui_update_check,
|
||||||
|
background_color='#424042',
|
||||||
|
tooltip = "Toggle update check on launch.",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
sg.Text("Tracking Algorithim Settings:", background_color='#242224'),
|
sg.Text("Tracking Algorithim Settings:", background_color='#242224'),
|
||||||
@ -420,6 +430,9 @@ class SettingsWidget:
|
|||||||
self.config.gui_skip_autoradius = values[self.gui_skip_autoradius]
|
self.config.gui_skip_autoradius = values[self.gui_skip_autoradius]
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
if self.config.gui_update_check != values[self.gui_update_check]:
|
||||||
|
self.config.gui_update_check = values[self.gui_update_check]
|
||||||
|
changed = True
|
||||||
|
|
||||||
if self.config.gui_BLINK != values[self.gui_BLINK]:
|
if self.config.gui_BLINK != values[self.gui_BLINK]:
|
||||||
self.config.gui_BLINK = values[self.gui_BLINK]
|
self.config.gui_BLINK = values[self.gui_BLINK]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user