Merge branch 'overlay_ruby' into develop
This commit is contained in:
@@ -186,7 +186,7 @@ def _overlay_small_validator(val, inst):
|
|||||||
new[key] = float(v)
|
new[key] = float(v)
|
||||||
elif key in ['display_duration','fadeout_duration'] and isinstance(v,int):
|
elif key in ['display_duration','fadeout_duration'] and isinstance(v,int):
|
||||||
new[key] = v
|
new[key] = v
|
||||||
elif key in ['opacity','ui_scaling', 'ruby_font_scale', 'ruby_line_spacing'] and isinstance(v,(int,float)):
|
elif key in ['opacity','ui_scaling'] and isinstance(v,(int,float)):
|
||||||
new[key] = float(v)
|
new[key] = float(v)
|
||||||
return new
|
return new
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ def _overlay_large_validator(val, inst):
|
|||||||
new[key] = float(v)
|
new[key] = float(v)
|
||||||
elif key in ['display_duration','fadeout_duration'] and isinstance(v,int):
|
elif key in ['display_duration','fadeout_duration'] and isinstance(v,int):
|
||||||
new[key] = v
|
new[key] = v
|
||||||
elif key in ['opacity','ui_scaling', 'ruby_font_scale', 'ruby_line_spacing'] and isinstance(v,(int,float)):
|
elif key in ['opacity','ui_scaling'] and isinstance(v,(int,float)):
|
||||||
new[key] = float(v)
|
new[key] = float(v)
|
||||||
return new
|
return new
|
||||||
|
|
||||||
@@ -737,8 +737,6 @@ class Config:
|
|||||||
"opacity": 1.0,
|
"opacity": 1.0,
|
||||||
"ui_scaling": 1.0,
|
"ui_scaling": 1.0,
|
||||||
"tracker": "HMD",
|
"tracker": "HMD",
|
||||||
"ruby_font_scale": 0.5,
|
|
||||||
"ruby_line_spacing": 4,
|
|
||||||
}
|
}
|
||||||
self._OVERLAY_LARGE_LOG = False
|
self._OVERLAY_LARGE_LOG = False
|
||||||
self._OVERLAY_LARGE_LOG_SETTINGS = {
|
self._OVERLAY_LARGE_LOG_SETTINGS = {
|
||||||
@@ -753,8 +751,6 @@ class Config:
|
|||||||
"opacity": 1.0,
|
"opacity": 1.0,
|
||||||
"ui_scaling": 1.0,
|
"ui_scaling": 1.0,
|
||||||
"tracker": "LeftHand",
|
"tracker": "LeftHand",
|
||||||
"ruby_font_scale": 0.5,
|
|
||||||
"ruby_line_spacing": 4,
|
|
||||||
}
|
}
|
||||||
self._OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGES = False
|
self._OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGES = False
|
||||||
self._SEND_MESSAGE_TO_VRC = True
|
self._SEND_MESSAGE_TO_VRC = True
|
||||||
|
|||||||
@@ -951,10 +951,6 @@ class Model:
|
|||||||
if isinstance(target_language, dict):
|
if isinstance(target_language, dict):
|
||||||
target_language_list = [data["language"] for data in target_language.values() if data.get("enable") is True]
|
target_language_list = [data["language"] for data in target_language.values() if data.get("enable") is True]
|
||||||
|
|
||||||
# Fetch ruby settings from config (with safe defaults if missing)
|
|
||||||
ruby_font_scale = config.OVERLAY_SMALL_LOG_SETTINGS.get("ruby_font_scale", 0.5)
|
|
||||||
ruby_line_spacing = config.OVERLAY_SMALL_LOG_SETTINGS.get("ruby_line_spacing", 4)
|
|
||||||
|
|
||||||
# 翻訳行ルビ (任意) が指定されていれば渡す。後方互換のため None / 不正型は空リストに。
|
# 翻訳行ルビ (任意) が指定されていれば渡す。後方互換のため None / 不正型は空リストに。
|
||||||
if not isinstance(transliteration_message, list):
|
if not isinstance(transliteration_message, list):
|
||||||
transliteration_message = []
|
transliteration_message = []
|
||||||
@@ -968,8 +964,6 @@ class Model:
|
|||||||
target_language_list,
|
target_language_list,
|
||||||
transliteration_message=transliteration_message,
|
transliteration_message=transliteration_message,
|
||||||
transliteration_translation=transliteration_translation,
|
transliteration_translation=transliteration_translation,
|
||||||
ruby_font_scale=ruby_font_scale,
|
|
||||||
ruby_line_spacing=ruby_line_spacing,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def createOverlayImageSmallMessage(self, message):
|
def createOverlayImageSmallMessage(self, message):
|
||||||
|
|||||||
Reference in New Issue
Block a user