Page 1 of 1
container with id -right-side moved to top when screen is wider
Posted: 09 April 2023, 19:12
by developgame
I love how the player panels -container "right-side" moves to top of screen for when screens width are smaller than 980px.
My project's game board is very wide. How can I have container "right-side" move to the top of screen when screen width is < 1200px rather than 980px?
Thanks for any help!
Re: container with id -right-side moved to top when screen is wider
Posted: 09 April 2023, 23:22
by Tisaac
developgame wrote: ↑09 April 2023, 19:12
I love how the player panels -container "right-side" moves to top of screen for when screens width are smaller than 980px.
My project's game board is very wide. How can I have container "right-side" move to the top of screen when screen width is < 1200px rather than 980px?
Thanks for any help!
No easy way, the threshold is hard coded in bga code
Re: container with id -right-side moved to top when screen is wider
Posted: 10 April 2023, 17:46
by developgame
Thanks Tisaac! I REally appreciate how you help us newbies!
Tisaac wrote: ↑09 April 2023, 23:22
developgame wrote: ↑09 April 2023, 19:12
I love how the player panels -container "right-side" moves to top of screen for when screens width are smaller than 980px.
My project's game board is very wide. How can I have container "right-side" move to the top of screen when screen width is < 1200px rather than 980px?
Thanks for any help!
No easy way, the threshold is hard coded in bga code
Re: container with id -right-side moved to top when screen is wider
Posted: 11 April 2023, 03:12
by IndianaScones
You should be able to do it with this in your JS Setup:
Code: Select all
if( screen.width <= 1200 ) {
dojo.removeClass('ebd-body', 'desktop-version');
dojo.addClass('ebd-body', 'mobile-version');
}
Re: container with id -right-side moved to top when screen is wider
Posted: 11 April 2023, 08:33
by Tisaac
IndianaScones wrote: ↑11 April 2023, 03:12
You should be able to do it with this in your JS Setup:
Code: Select all
if( screen.width <= 1200 ) {
dojo.removeClass('ebd-body', 'desktop-version');
dojo.addClass('ebd-body', 'mobile-version');
}
Have you tested this one ?
Re: container with id -right-side moved to top when screen is wider
Posted: 12 April 2023, 02:29
by IndianaScones
Yep, I experimented with something like this a while ago when I was early in working on the overall layout but abandoned it because it wasn't solving my problem. So I have tested it but not extensively. It worked fine in the short amount of time I was using it.
If you look at Wingspan, it is set to be in "mobile mode" at all times, as ebd-body has the .mobile-version class even in desktop games.