feat: Add weather foreground option (experimental)

- Add weatherEffectsForeground setting to render weather effects in front of chat
- Add UI toggle in main panel (visible when Dynamic Weather toggle is visible)
- Apply z-index 9998 when foreground option is enabled
- Fix weather container sizing with viewport units (100vh/100dvh) for better mobile support
This commit is contained in:
tomt610
2026-01-11 15:38:47 +00:00
parent f3deead868
commit bb3028adbb
6 changed files with 31 additions and 2 deletions
+11
View File
@@ -403,6 +403,16 @@ async function initUI() {
toggleDynamicWeather(extensionSettings.enableDynamicWeather);
});
$('#rpg-toggle-weather-foreground').on('change', function() {
extensionSettings.weatherEffectsForeground = $(this).prop('checked');
saveSettings();
// Re-apply weather effect with new z-index
if (extensionSettings.enableDynamicWeather) {
toggleDynamicWeather(false);
toggleDynamicWeather(true);
}
});
$('#rpg-toggle-narrator').on('change', function() {
extensionSettings.narratorMode = $(this).prop('checked');
saveSettings();
@@ -879,6 +889,7 @@ async function initUI() {
$('#rpg-toggle-spotify-music').prop('checked', extensionSettings.enableSpotifyMusic);
$('#rpg-toggle-dynamic-weather').prop('checked', extensionSettings.enableDynamicWeather);
$('#rpg-toggle-weather-foreground').prop('checked', extensionSettings.weatherEffectsForeground ?? false);
$('#rpg-toggle-narrator').prop('checked', extensionSettings.narratorMode);
// Feature toggle visibility settings