Is there a way to hide window while game is starting in Bevy? - bevy

When running game in Bevy: At startup, I see a big window with white rectangle in it. After a few seconds my WindowDescriptor kicks in, and the window is resized to the dimensions that I want.
Is there a way to hide the window during the loading process, so I don't see the white rectangle? Or some other way to have my own loading screen?
I see this issue on the breakout example in Bevy. I am running in Windows10 OS.

Related

Unity, at higher resolution (2560 x 1440) tester cannot click the navigation elements on the screen even though they are in position

Here is my issue, the way my game works is that you click on the edges of the screen to navigate. This is done through an Overlay Canvas using OnPointerClick. I colored the navigation areas, and scale the canvas according to screen size and the navigation areas appear on their screen as they should. Yet they CANNOT click any of the elements for some reason. They have another monitor that works without issue. They've noted that their larger monitor is AMD. I've also confirmed that the ability to navigate in game has not been hindered. I have never had this issue (or any other testers) on 1920x1080 monitors.
I have completely exhausted what the issue can be, they cannot even navigate on a bare bones tutorial. Any ideas would be GREATLY appreciated.
Here is an image of their screen and the respective clickable navigation areas.
[img]https://i.imgur.com/NVQkA8g.png[/img]
Unity 2019.2.14f1
Put a Image component without sprite, because without that, you will not detect any click. You can set the alpha to 0 after you see that working.
Also check the anchors of the navigation areas.

Gdk Screen and add_provider_for_screen

What exactly is Gdk Screen represent?
My guess was that Screen represent whole display area of the pc and Window represent display area of certain application.
Then what is the meaning of adding provider to the screen in code shown below.I think i m interested in styling only current application window.
css_provider = Gtk.CssProvider()
css_provider.load_from_data(css.encode())
context = Gtk.StyleContext()
screen = Gdk.Screen.get_default()
context.add_provider_for_screen(screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
Adds a global style provider to screen, which will be used in style
construction for all Gtk.StyleContexts under screen
this is in the documentation of add_provider_for_screen().
Am i not understanding What screen is properly?
Yes Gtk.screen is the system screen and it handle all the physical screens(multiple monitors). This is that there is one screen for all the monitors(or is the common case); with this in mind, monitors doesn't need to have the same dimensions and, once the application is running it cannot change the style by itself, so this is the screen job. This prevents the application to display annoying sizes along the screen.
So, since 5 pixels are not always 5 pixels, style is something that needs be managed by the screen and not by the window, and all of that without considering the color management.

How can I change the screen size in Unity?

Currently I am working on a Unity project. I started it on version 2018.3.6f1. The other day I installed version 2019.3.0a2 and this changed the screen size so now I have a white background at each side.
If I try going back to the size I had using the scale tool, it does not work so what do you recommend to change my screen size correctly or change it to its original one?
Here is a representation of my problem:
https://imgur.com/a/QKl9kVr
This is related to a setting you can change from the top bar of the Game window, it effectively sets the screen size emulation within the editor to different values, it looks like you want to have 'Free' mode, but you can also check behaviours in any other resolution

Unity - interface buttons "dislocated" from graphics on phones with notches

We're having this weird problem with a game we're porting to mobile: All UI elements work fine, except when you run it on a phone with notches (iPhoneX for instance). When that happens the interface gets rescaled to fit the device's safe area, which creates two black bars on the extremes (which is ok for now). Then, the area in which you have to click to activate any buttons doesn't correspond to the button graphics themselves anymore.
It's as if the input detection area is stretched to cover the entire area of the phone, but the graphics are scaled down, "dislocating" the input touch areas.
The picture below shows the problem:
Notice the red scribbles showing the area that's outside the safe areas, and the green circle showing where the input for the button actually went.
Additional info: for the levels to work properly we have to force the resolution to 1080 using Screen.SetResolution(). Could this have anything to do with the problem?

Can a Matlab GUI (created in Guide) appear in or in front of a Psychtoolbox window?

I'm using psychtoolbox 3 with Matlab 2019b on a Mac running OSX 10.12.
I'm presenting static image stimuli using psychtoolbox (PTB) and would like to have a floating audio player gui object that I created using guide to appear on the screen as well. Importantly, the audio player has its own functions (slider bar to fastFWD and rewind the audio and a play/pause button) and I need to preserve the button's functionality. Rather than attempting to recreate the the player and buttons etc. within PTB, is it possible to display the gui above the window's screen content?
I've seen other threads about displaying a figure within a PTB window, but this was for graph rather than a gui. I don't believe PTB retains the functionality of the buttons when displaying the figure. I've also considered making the window smaller than the full screen in order to display the figure on the side, but I'd prefer to remain full screen if at all possible.
So to summarize, is there a way for a figure window appear in front of the PTB window? Alternatively, can a PTB window appear within a figure window (i.e., within the axes of a gui created in guide?
Thank you!
Unfortunately I don't believe what you want - to have a full screen Psychtoolbox window as well as a MATLAB GUI .fig as an overlay - is possible. Even if the Psychtoolbox window is less than full screen, you can't give the MATLAB .fig focus and have it overlay the Psychtoolbox window, it will be placed underneath the Psychtoolbox window. You also won't be able to plot the Psychtoolbox window inside of a MATLAB GUI window. What I think your options are:
Make the Psychtoolbox window less than full screen, place the player GUI next to it.
Use a secondary monitor to host the MATLAB GUI, so the Psychtoolbox screen can be full size on the main monitor.