Checkpoint before line-grid scrolling refactor

This commit is contained in:
2026-05-16 13:44:03 +02:00
parent 42582352d6
commit fe33e4f0ab
25 changed files with 1989 additions and 840 deletions
+5 -10
View File
@@ -38,7 +38,6 @@ class UIControllerModule extends BaseModule {
this.bindMethods([
'initialize',
'handleCommand',
'displayText',
'setupBookInterface',
'applyBookSizing',
'setupEventListeners',
@@ -264,7 +263,7 @@ class UIControllerModule extends BaseModule {
});
this.addEventListener(document, 'click', (event) => {
if (event.target && event.target.closest && event.target.closest('#options-modal, #controls, #player_input, #command_input')) {
if (event.target && event.target.closest && event.target.closest('#options-modal, #controls, #player_input, #command_input, #story_scrollbar')) {
return;
}
@@ -668,10 +667,9 @@ class UIControllerModule extends BaseModule {
console.log('UI Controller: Command sent successfully');
} else {
console.error('UI Controller: Failed to send command to socket');
// Display an error message to the user
this.displayHandler.displayText('⚠️ Unable to send command. Server connection might be lost.', {
style: { color: '#990000' }
});
document.dispatchEvent(new CustomEvent('story:process-state', {
detail: { state: 'ready', reason: 'command-send-failed' }
}));
}
} else {
console.error('UI Controller: Socket client not available for sending commands');
@@ -775,10 +773,6 @@ class UIControllerModule extends BaseModule {
}
}
displayText(text, options = {}) {
return this.displayHandler.displayText(text, options);
}
clearDisplay() {
this.displayHandler.clear();
}
@@ -796,3 +790,4 @@ const uiController = new UIControllerModule();
// Export the module
export { uiController as UIController };