6060 # player-container .layout-panel-right {
6161 justify-content : flex-end;
6262 }
63+
64+ /* Dark Scrollbar for Inner Content Panes */
65+ # player-inner-container ::-webkit-scrollbar ,
66+ # scene-editor-preview # preview-player-inner-container ::-webkit-scrollbar {
67+ width : 12px ;
68+ }
69+
70+ # player-inner-container ::-webkit-scrollbar-track ,
71+ # scene-editor-preview # preview-player-inner-container ::-webkit-scrollbar-track {
72+ background : # 1e1e1e ;
73+ border-radius : 8px ;
74+ }
75+
76+ # player-inner-container ::-webkit-scrollbar-thumb ,
77+ # scene-editor-preview # preview-player-inner-container ::-webkit-scrollbar-thumb {
78+ background-color : # 444 ;
79+ border-radius : 6px ;
80+ border : 2px solid # 1e1e1e ;
81+ }
6382
83+ # player-inner-container ::-webkit-scrollbar-thumb : hover ,
84+ # scene-editor-preview # preview-player-inner-container ::-webkit-scrollbar-thumb : hover {
85+ background-color : # 555 ;
86+ }
6487
6588 h1 , h2 , h3 { border-bottom : 2px solid var (--primary-color ); padding-bottom : 5px ; margin-top : 0 ; }
6689 # variable-manager-modal h3 { border-bottom : none !important ; }
256279 border : var (--container-outline-width , 0 ) solid var (--container-outline-color , transparent);
257280 background-color : var (--container-bg-color );
258281 gap : 20px ; padding : var (--padding ); border-radius : 12px ; box-sizing : border-box; display : flex;
282+ max-height : 95% ;
283+ overflow-y : auto;
259284 }
260285
261286 # scene-editor-preview .choice-btn { padding : 15px 20px ; pointer-events : none; background-color : var (--btn-color ); color : var (--btn-text-color ); border : var (--container-outline-width , 0 ) solid var (--container-outline-color , transparent); text-align : left; border-radius : 6px ; font-size : 1em ; font-family : var (--font-family ); }
356381 margin : 20px ;
357382 position : relative;
358383 z-index : 1 ;
384+ max-height : 90vh ;
385+ overflow-y : auto;
359386 }
360387 /* --- CORRECTED ---: Changed selector for in-app player panel layout for consistency */
361388 # player-inner-container .layout-panel-left ,
532559 < button id ="toggle-tree-view-btn " class ="active " title ="Tree View ">
533560 < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="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,0,1,0,11.5v-1A1.5 1.5,0,0,1,1.5,9h.05a.5.5,0,0,1,0,1H1.5a.5.5,0,0,0-.5,.5v1a.5.5,0,0,0,.5,.5H3v.5a.5.5,0,0,0,.5,.5H11a.5.5,0,0,0,.5-.5V13h1.5a.5.5,0,0,0,.5-.5v-1a.5.5,0,0,0-.5-.5h-.05a.5.5,0,0,1,0-1H14.5A1.5 1.5,0,0,1,16,10.5Z "/>
536563 </ svg >
537564 Tree
538565 </ button >
@@ -932,6 +959,23 @@ <h2>Import Log</h2>
932959 position : relative;
933960 padding : var (--padding );
934961 z-index : 1 ;
962+ max-height : 90vh ;
963+ overflow-y : auto;
964+ }
965+ # game-container ::-webkit-scrollbar {
966+ width : 12px ;
967+ }
968+ # game-container ::-webkit-scrollbar-track {
969+ background : # 1e1e1e ;
970+ border-radius : 8px ;
971+ }
972+ # game-container ::-webkit-scrollbar-thumb {
973+ background-color : # 444 ;
974+ border-radius : 6px ;
975+ border : 2px solid # 1e1e1e ;
976+ }
977+ # game-container ::-webkit-scrollbar-thumb : hover {
978+ background-color : # 555 ;
935979 }
936980 # image-container , # content-container {
937981 position : relative;
@@ -1659,12 +1703,15 @@ <h2 id="about-title"></h2>
16591703 return ;
16601704 }
16611705
1662- // Always save before switching
1663- if ( App . state . currentSceneId ) {
1706+ const isPlayerActive = App . elements [ 'player-container' ] . style . display === 'flex' ;
1707+
1708+ // BUG FIX: Only save the editor's state if the player is NOT active.
1709+ // When the player is active, the editor's content is stale and must not be saved.
1710+ if ( ! isPlayerActive && App . state . currentSceneId ) {
16641711 App . editor . saveCurrentScene ( ) ;
16651712 }
16661713
1667- // Stop any media from the previous scene
1714+ // Stop any media from the previous scene's preview
16681715 App . elements [ 'ambience-player' ] . pause ( ) ;
16691716 const previewVideo = App . elements [ 'preview-player-video' ] ;
16701717 if ( previewVideo && ! previewVideo . paused ) {
@@ -1673,11 +1720,14 @@ <h2 id="about-title"></h2>
16731720 previewVideo . load ( ) ;
16741721 }
16751722
1676- if ( App . elements [ 'player-container' ] . style . display === 'flex' ) {
1723+ // If the player is active, just render the new scene there and stop.
1724+ if ( isPlayerActive ) {
16771725 await App . player . renderScene ( sceneId ) ;
16781726 return ;
16791727 }
16801728
1729+ // --- The rest of this function only runs for editor-only changes ---
1730+
16811731 const needsSelectionChange = App . state . currentSceneId !== sceneId ;
16821732
16831733 if ( needsSelectionChange ) {
0 commit comments