Extract createWindow helper to deduplicate window setup code
Refactor showStatsWindow, showInventoryWindow, and showChatWindow to use a shared createWindow() helper that handles existence checks, z-index management, header/close button creation, and makeDraggable setup. Each function now only contains its unique content creation logic. Added .window-content CSS class to style.css, style-ac.css, and the christmas theme to maintain flex layout through the new wrapper div. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a0698753c5
commit
a82e6f4856
3 changed files with 164 additions and 148 deletions
|
|
@ -540,6 +540,14 @@ body {
|
|||
z-index: 10000;
|
||||
}
|
||||
|
||||
.window-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue