Checkpoint current UI and ink integration state
This commit is contained in:
@@ -7,7 +7,7 @@ class UIControllerModule extends BaseModule {
|
||||
|
||||
// Remove 'tts' from direct dependencies to break circular dependency
|
||||
// UI Controller will access TTS through the Game Loop instead
|
||||
this.dependencies = ['animation-queue', 'ui-display-handler', 'ui-input-handler', 'ui-effects', 'text-buffer', 'socket-client', 'sentence-queue', 'playback-coordinator', 'persistence-manager'];
|
||||
this.dependencies = ['animation-queue', 'ui-display-handler', 'ui-input-handler', 'ui-effects', 'text-buffer', 'socket-client', 'sentence-queue', 'playback-coordinator', 'persistence-manager', 'tts-factory', 'options-ui'];
|
||||
|
||||
// References to sub-modules
|
||||
this.displayHandler = null;
|
||||
@@ -734,15 +734,13 @@ class UIControllerModule extends BaseModule {
|
||||
|
||||
// Update speech toggle button state
|
||||
if (speechToggle) {
|
||||
// Update the button appearance based on TTS state using existing styles
|
||||
speechToggle.removeAttribute('disabled');
|
||||
speechToggle.setAttribute('aria-pressed', this.ttsEnabled ? 'true' : 'false');
|
||||
speechToggle.classList.toggle('is-active', this.ttsEnabled);
|
||||
speechToggle.classList.toggle('is-inactive', !this.ttsEnabled);
|
||||
if (this.ttsEnabled) {
|
||||
speechToggle.style.fontWeight = 'bold';
|
||||
speechToggle.style.color = '#000';
|
||||
speechToggle.title = this.ttsAvailable ? 'Disable speech' : 'Speech enabled, selected provider is not ready';
|
||||
} else {
|
||||
speechToggle.style.fontWeight = 'normal';
|
||||
speechToggle.style.color = '#999';
|
||||
speechToggle.title = 'Enable speech';
|
||||
}
|
||||
}
|
||||
@@ -750,8 +748,9 @@ class UIControllerModule extends BaseModule {
|
||||
if (autoplayToggle) {
|
||||
const autoplay = this.getStoredAppPreference('autoplay', true) !== false;
|
||||
autoplayToggle.removeAttribute('disabled');
|
||||
autoplayToggle.style.fontWeight = autoplay ? 'bold' : 'normal';
|
||||
autoplayToggle.style.color = autoplay ? '#000' : '#999';
|
||||
autoplayToggle.setAttribute('aria-pressed', autoplay ? 'true' : 'false');
|
||||
autoplayToggle.classList.toggle('is-active', autoplay);
|
||||
autoplayToggle.classList.toggle('is-inactive', !autoplay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user