Potential fix for game screen size issue

This commit is contained in:
ebolam
2022-10-22 20:00:49 -04:00
parent 0cc555db7c
commit 0a17b5dddb
3 changed files with 20 additions and 21 deletions

View File

@@ -1141,28 +1141,26 @@ body {
grid-template-areas: "menuicon gamescreen options lefticon" grid-template-areas: "menuicon gamescreen options lefticon"
"menuicon theme theme lefticon" "menuicon theme theme lefticon"
"menuicon inputrow inputrow lefticon"; "menuicon inputrow inputrow lefticon";
grid-template-columns: 30px auto var(--story_options_size) 30px; grid-template-columns: 30px auto fit-content(30%) 30px;
grid-template-rows: auto min-content 100px; grid-template-rows: auto min-content 100px;
} }
.main-grid[option_length="0"][model_numseqs="1"] {
grid-template-columns: 30px auto 0px 30px;
}
.main-grid.settings_pinned { .main-grid.settings_pinned {
margin-left: var(--flyout_menu_width); margin-left: var(--flyout_menu_width);
*grid-template-columns: 30px auto var(--story_options_size) 30px;
} }
.main-grid.story_pinned { .main-grid.story_pinned {
margin-right: var(--flyout_menu_width); margin-right: var(--flyout_menu_width);
/*margin-left: var(--setting_menu_closed_width_no_pins_width);
grid-template-areas: var(--story_pinned_areas);
grid-template-columns: var(--story_pinned_area_widths);*/
} }
.main-grid.settings_pinned.story_pinned { .main-grid.settings_pinned.story_pinned {
margin-left: var(--flyout_menu_width); margin-left: var(--flyout_menu_width);
margin-right: var(--flyout_menu_width); margin-right: var(--flyout_menu_width);
grid-template-areas: "menuicon gamescreen options lefticon"
"menuicon theme theme lefticon"
"menuicon inputrow inputrow lefticon";
grid-template-columns: 30px auto var(--story_options_size) 30px;
} }
} }
@media only screen and (max-aspect-ratio: 7/5) { @media only screen and (max-aspect-ratio: 7/5) {

View File

@@ -211,6 +211,7 @@ function fix_text(val) {
function create_options(action) { function create_options(action) {
//Set all options before the next chunk to hidden //Set all options before the next chunk to hidden
document.getElementById('main-grid').setAttribute('option_length', action.action.Options.length);
var option_container = document.getElementById("Select Options"); var option_container = document.getElementById("Select Options");
var current_chunk = parseInt(document.getElementById("action_count").textContent)+1; var current_chunk = parseInt(document.getElementById("action_count").textContent)+1;
if (current_chunk != action.id.toString()) { if (current_chunk != action.id.toString()) {
@@ -757,17 +758,17 @@ function var_changed(data) {
} }
//if we changed the gen amount, make sure our option area is set/not set //if we changed the gen amount, make sure our option area is set/not set
if ((data.classname == 'model') && (data.name == 'numseqs')) { //if ((data.classname == 'model') && (data.name == 'numseqs')) {
if (data.value == 1) { // if (data.value == 1) {
//allow our options to collapse to 0%, but no more than 30% (in case there is a redo or the like) // //allow our options to collapse to 0%, but no more than 30% (in case there is a redo or the like)
var r = document.querySelector(':root'); // var r = document.querySelector(':root');
r.style.setProperty('--story_options_size', 'fit-content(30%)'); // r.style.setProperty('--story_options_size', 'fit-content(30%)');
} else { // } else {
//static 30% // //static 30%
var r = document.querySelector(':root'); // var r = document.querySelector(':root');
r.style.setProperty('--story_options_size', '30%'); // r.style.setProperty('--story_options_size', 'fit-content(30%)');
} // }
} //}
//if we're updating generated tokens, let's show that in our status bar //if we're updating generated tokens, let's show that in our status bar
if ((data.classname == 'model') && (data.name == 'tqdm_progress')) { if ((data.classname == 'model') && (data.name == 'tqdm_progress')) {

View File

@@ -41,7 +41,7 @@
</div> </div>
<!------------ Main Screen---------------------> <!------------ Main Screen--------------------->
<div id="main-grid" class="main-grid settings_pinned" onclick="close_menus();"> <div id="main-grid" class="main-grid settings_pinned var_sync_alt_model_numseqs" onclick="close_menus();" option_length="0">
<!------------ Game Text Screen---------------------> <!------------ Game Text Screen--------------------->
<div class="gamescreen" id="gamescreen"> <div class="gamescreen" id="gamescreen">
<div id="disconnect_message"><center><h1>Disconnected</h1></center></div> <div id="disconnect_message"><center><h1>Disconnected</h1></center></div>