Checkpoint before line-grid scrolling refactor
This commit is contained in:
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user