👍️[Update] Model : Overlay Large log機能を追加

This commit is contained in:
misyaguziya
2024-11-09 16:49:45 +09:00
parent c00542ef57
commit 78dad96124
5 changed files with 289 additions and 85 deletions

View File

@@ -770,6 +770,38 @@ class Config:
self._OVERLAY_SMALL_LOG_SETTINGS[key] = float(value)
self.saveConfig(inspect.currentframe().f_code.co_name, self.OVERLAY_SMALL_LOG_SETTINGS)
@property
@json_serializable('OVERLAY_LARGE_LOG')
def OVERLAY_LARGE_LOG(self):
return self._OVERLAY_LARGE_LOG
@OVERLAY_LARGE_LOG.setter
def OVERLAY_LARGE_LOG(self, value):
if isinstance(value, bool):
self._OVERLAY_LARGE_LOG = value
self.saveConfig(inspect.currentframe().f_code.co_name, value)
@property
@json_serializable('OVERLAY_LARGE_LOG_SETTINGS')
def OVERLAY_LARGE_LOG_SETTINGS(self):
return self._OVERLAY_LARGE_LOG_SETTINGS
@OVERLAY_LARGE_LOG_SETTINGS.setter
def OVERLAY_LARGE_LOG_SETTINGS(self, value):
if isinstance(value, dict) and set(value.keys()) == set(self.OVERLAY_LARGE_LOG_SETTINGS.keys()):
for key, value in value.items():
match (key):
case "x_pos" | "y_pos" | "z_pos" | "x_rotation" | "y_rotation" | "z_rotation":
if isinstance(value, (int, float)):
self._OVERLAY_LARGE_LOG_SETTINGS[key] = float(value)
case "display_duration" | "fadeout_duration":
if isinstance(value, int):
self._OVERLAY_LARGE_LOG_SETTINGS[key] = value
case "opacity" | "ui_scaling":
if isinstance(value, (int, float)):
self._OVERLAY_LARGE_LOG_SETTINGS[key] = float(value)
self.saveConfig(inspect.currentframe().f_code.co_name, self.OVERLAY_LARGE_LOG_SETTINGS)
@property
@json_serializable('SEND_MESSAGE_TO_VRC')
def SEND_MESSAGE_TO_VRC(self):
@@ -1055,6 +1087,19 @@ class Config:
"opacity": 1.0,
"ui_scaling": 1.0,
}
self._OVERLAY_LARGE_LOG = False
self._OVERLAY_LARGE_LOG_SETTINGS = {
"x_pos": 0.0,
"y_pos": 0.0,
"z_pos": 0.0,
"x_rotation": 0.0,
"y_rotation": 0.0,
"z_rotation": 0.0,
"display_duration": 5,
"fadeout_duration": 2,
"opacity": 1.0,
"ui_scaling": 1.0,
}
self._SEND_MESSAGE_TO_VRC = True
self._SEND_RECEIVED_MESSAGE_TO_VRC = False
self._LOGGER_FEATURE = False