👍️[Update] Model : Overlay settings にtrackerを追加

This commit is contained in:
misyaguziya
2024-11-09 17:33:51 +09:00
parent d4f58fdb90
commit 7f1b635f63
3 changed files with 59 additions and 24 deletions

View File

@@ -94,6 +94,7 @@ class Model:
config.OVERLAY_SMALL_LOG_SETTINGS["opacity"],
config.OVERLAY_SMALL_LOG_SETTINGS["ui_scaling"],
)
self.overlay_small_log_pre_settings = config.OVERLAY_SMALL_LOG_SETTINGS
self.overlay_large_log = Overlay(
"VRCT_LARGE_LOG",
"VRCT_LARGE_LOG",
@@ -108,6 +109,7 @@ class Model:
config.OVERLAY_LARGE_LOG_SETTINGS["opacity"],
config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"],
)
self.overlay_large_log_pre_settings = config.OVERLAY_LARGE_LOG_SETTINGS
self.overlay_image = OverlayImage()
self.mic_audio_queue = None
self.mic_mute_status = None
@@ -726,18 +728,31 @@ class Model:
self.overlay_small_log.startOverlay()
def updateOverlaySmallLogSettings(self):
self.overlay_small_log.updatePosition(
config.OVERLAY_SMALL_LOG_SETTINGS["x_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["y_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["z_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["x_rotation"],
config.OVERLAY_SMALL_LOG_SETTINGS["y_rotation"],
config.OVERLAY_SMALL_LOG_SETTINGS["z_rotation"],
)
self.overlay_small_log.updateDisplayDuration(config.OVERLAY_SMALL_LOG_SETTINGS["display_duration"])
self.overlay_small_log.updateFadeoutDuration(config.OVERLAY_SMALL_LOG_SETTINGS["fadeout_duration"])
self.overlay_small_log.updateOpacity(config.OVERLAY_SMALL_LOG_SETTINGS["opacity"], with_fade=True)
self.overlay_small_log.updateUiScaling(config.OVERLAY_SMALL_LOG_SETTINGS["ui_scaling"])
for key in self.overlay_small_log_pre_settings.keys():
if self.overlay_small_log_pre_settings[key] != config.OVERLAY_SMALL_LOG_SETTINGS[key]:
match (key):
case "x_pos" | "y_pos" | "z_pos" | "x_rotation" | "y_rotation" | "z_rotation" | "tracker":
self.overlay_small_log.updatePosition(
config.OVERLAY_SMALL_LOG_SETTINGS["x_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["y_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["z_pos"],
config.OVERLAY_SMALL_LOG_SETTINGS["x_rotation"],
config.OVERLAY_SMALL_LOG_SETTINGS["y_rotation"],
config.OVERLAY_SMALL_LOG_SETTINGS["z_rotation"],
config.OVERLAY_SMALL_LOG_SETTINGS["tracker"],
)
case "display_duration":
self.overlay_small_log.updateDisplayDuration(config.OVERLAY_SMALL_LOG_SETTINGS["display_duration"])
case "fadeout_duration":
self.overlay_small_log.updateFadeoutDuration(config.OVERLAY_SMALL_LOG_SETTINGS["fadeout_duration"])
case "opacity":
self.overlay_small_log.updateOpacity(config.OVERLAY_SMALL_LOG_SETTINGS["opacity"], with_fade=True)
case "ui_scaling":
self.overlay_small_log.updateUiScaling(config.OVERLAY_SMALL_LOG_SETTINGS["ui_scaling"])
case _:
pass
break
self.overlay_small_log_pre_settings = config.OVERLAY_SMALL_LOG_SETTINGS
def shutdownOverlaySmall(self):
self.overlay_small_log.shutdownOverlay()
@@ -757,18 +772,31 @@ class Model:
self.overlay_large_log.startOverlay()
def updateOverlayLargeLogSettings(self):
self.overlay_large_log.updatePosition(
config.OVERLAY_LARGE_LOG_SETTINGS["x_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["y_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["z_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["x_rotation"],
config.OVERLAY_LARGE_LOG_SETTINGS["y_rotation"],
config.OVERLAY_LARGE_LOG_SETTINGS["z_rotation"],
)
self.overlay_large_log.updateDisplayDuration(config.OVERLAY_LARGE_LOG_SETTINGS["display_duration"])
self.overlay_large_log.updateFadeoutDuration(config.OVERLAY_LARGE_LOG_SETTINGS["fadeout_duration"])
self.overlay_large_log.updateOpacity(config.OVERLAY_LARGE_LOG_SETTINGS["opacity"], with_fade=True)
self.overlay_large_log.updateUiScaling(config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"])
for key in self.overlay_large_log_pre_settings.keys():
if self.overlay_large_log_pre_settings[key] != config.OVERLAY_LARGE_LOG_SETTINGS[key]:
match (key):
case "x_pos" | "y_pos" | "z_pos" | "x_rotation" | "y_rotation" | "z_rotation" | "tracker":
self.overlay_large_log.updatePosition(
config.OVERLAY_LARGE_LOG_SETTINGS["x_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["y_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["z_pos"],
config.OVERLAY_LARGE_LOG_SETTINGS["x_rotation"],
config.OVERLAY_LARGE_LOG_SETTINGS["y_rotation"],
config.OVERLAY_LARGE_LOG_SETTINGS["z_rotation"],
config.OVERLAY_LARGE_LOG_SETTINGS["tracker"],
)
case "display_duration":
self.overlay_large_log.updateDisplayDuration(config.OVERLAY_LARGE_LOG_SETTINGS["display_duration"])
case "fadeout_duration":
self.overlay_large_log.updateFadeoutDuration(config.OVERLAY_LARGE_LOG_SETTINGS["fadeout_duration"])
case "opacity":
self.overlay_large_log.updateOpacity(config.OVERLAY_LARGE_LOG_SETTINGS["opacity"], with_fade=True)
case "ui_scaling":
self.overlay_large_log.updateUiScaling(config.OVERLAY_LARGE_LOG_SETTINGS["ui_scaling"])
case _:
pass
break
self.overlay_large_log_pre_settings = config.OVERLAY_LARGE_LOG_SETTINGS
def shutdownOverlayLarge(self):
self.overlay_large_log.shutdownOverlay()