Add 'Always Show Thought Bubble' setting
- New setting in Display Options to auto-expand thought bubble - When enabled, thought bubble displays immediately without clicking icon - Checkbox added to settings modal with descriptive help text - Default is off to maintain current behavior
This commit is contained in:
@@ -304,6 +304,13 @@ async function initUI() {
|
|||||||
updateChatThoughts();
|
updateChatThoughts();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#rpg-toggle-always-show-bubble').on('change', function() {
|
||||||
|
extensionSettings.alwaysShowThoughtBubble = $(this).prop('checked');
|
||||||
|
saveSettings();
|
||||||
|
// Re-render thoughts to apply the setting
|
||||||
|
updateChatThoughts();
|
||||||
|
});
|
||||||
|
|
||||||
$('#rpg-toggle-html-prompt').on('change', function() {
|
$('#rpg-toggle-html-prompt').on('change', function() {
|
||||||
extensionSettings.enableHtmlPrompt = $(this).prop('checked');
|
extensionSettings.enableHtmlPrompt = $(this).prop('checked');
|
||||||
// console.log('[RPG Companion] Toggle enableHtmlPrompt changed to:', extensionSettings.enableHtmlPrompt);
|
// console.log('[RPG Companion] Toggle enableHtmlPrompt changed to:', extensionSettings.enableHtmlPrompt);
|
||||||
@@ -405,6 +412,7 @@ async function initUI() {
|
|||||||
$('#rpg-toggle-thoughts').prop('checked', extensionSettings.showCharacterThoughts);
|
$('#rpg-toggle-thoughts').prop('checked', extensionSettings.showCharacterThoughts);
|
||||||
$('#rpg-toggle-inventory').prop('checked', extensionSettings.showInventory);
|
$('#rpg-toggle-inventory').prop('checked', extensionSettings.showInventory);
|
||||||
$('#rpg-toggle-thoughts-in-chat').prop('checked', extensionSettings.showThoughtsInChat);
|
$('#rpg-toggle-thoughts-in-chat').prop('checked', extensionSettings.showThoughtsInChat);
|
||||||
|
$('#rpg-toggle-always-show-bubble').prop('checked', extensionSettings.alwaysShowThoughtBubble);
|
||||||
$('#rpg-toggle-html-prompt').prop('checked', extensionSettings.enableHtmlPrompt);
|
$('#rpg-toggle-html-prompt').prop('checked', extensionSettings.enableHtmlPrompt);
|
||||||
$('#rpg-toggle-plot-buttons').prop('checked', extensionSettings.enablePlotButtons);
|
$('#rpg-toggle-plot-buttons').prop('checked', extensionSettings.enablePlotButtons);
|
||||||
$('#rpg-toggle-animations').prop('checked', extensionSettings.enableAnimations);
|
$('#rpg-toggle-animations').prop('checked', extensionSettings.enableAnimations);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const defaultSettings = {
|
|||||||
showCharacterThoughts: true,
|
showCharacterThoughts: true,
|
||||||
showInventory: true, // Show inventory section (v2 system)
|
showInventory: true, // Show inventory section (v2 system)
|
||||||
showThoughtsInChat: true, // Show thoughts overlay in chat
|
showThoughtsInChat: true, // Show thoughts overlay in chat
|
||||||
|
alwaysShowThoughtBubble: false, // Auto-expand thought bubble without clicking icon
|
||||||
enableHtmlPrompt: false, // Enable immersive HTML prompt injection
|
enableHtmlPrompt: false, // Enable immersive HTML prompt injection
|
||||||
enablePlotButtons: true, // Show plot progression buttons above chat input
|
enablePlotButtons: true, // Show plot progression buttons above chat input
|
||||||
panelPosition: 'right', // 'left', 'right', or 'top'
|
panelPosition: 'right', // 'left', 'right', or 'top'
|
||||||
|
|||||||
@@ -978,9 +978,16 @@ export function createThoughtPanel($message, thoughtsArray) {
|
|||||||
right: 'auto' // Clear any right positioning
|
right: 'auto' // Clear any right positioning
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initially hide the panel and show the icon
|
// Check if always show bubble is enabled
|
||||||
$thoughtPanel.hide();
|
if (extensionSettings.alwaysShowThoughtBubble) {
|
||||||
$thoughtIcon.show();
|
// Always show panel, hide icon
|
||||||
|
$thoughtPanel.show();
|
||||||
|
$thoughtIcon.hide();
|
||||||
|
} else {
|
||||||
|
// Initially hide the panel and show the icon
|
||||||
|
$thoughtPanel.hide();
|
||||||
|
$thoughtIcon.show();
|
||||||
|
}
|
||||||
|
|
||||||
// console.log('[RPG Companion] Thought panel created at:', { top, left });
|
// console.log('[RPG Companion] Thought panel created at:', { top, left });
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,14 @@
|
|||||||
Display character thoughts as overlay bubbles next to their messages
|
Display character thoughts as overlay bubbles next to their messages
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
|
<label class="checkbox_label">
|
||||||
|
<input type="checkbox" id="rpg-toggle-always-show-bubble" />
|
||||||
|
<span>Always Show Thought Bubble</span>
|
||||||
|
</label>
|
||||||
|
<small style="display: block; margin-left: 24px; margin-top: -8px; color: #888; font-size: 11px;">
|
||||||
|
Auto-expand thought bubble without clicking the icon first
|
||||||
|
</small>
|
||||||
|
|
||||||
<label class="checkbox_label">
|
<label class="checkbox_label">
|
||||||
<input type="checkbox" id="rpg-toggle-animations" />
|
<input type="checkbox" id="rpg-toggle-animations" />
|
||||||
<span>Enable Animations</span>
|
<span>Enable Animations</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user