Viewport Strech Mode Issues - resolution

I'm using godot 3.1 on windows and i created new project with a 2d scene.
I selected the stretch mode viewport and the expand aspect options,
when I run the scene and try to resize the window, the viewport turns black.

This appears to be a known bug still in Godot's core as per a GitHub bug report
Stretch Mode "viewport" causes screen not to update / black screen #23054
Also discussed here:
https://godotengine.org/qa/30600/black-screen-on-resize
I don't think there is a solution at the moment.

Related

How to snap a window to top/bottom half of screen

One of my favorite features in Windows is the ability to snap windows. [1]
With Windows 10 they can now be snapped to quarter-screen, as well as the left- and right-half screen available in previous Windows releases.
Is it possible to snap a window to top and bottom half?
In other words, snap a window to span the width of the monitor, but only half the height? It could be snapped to either the top or bottom of the screen.
https://support.microsoft.com/en-us/help/4027324/windows-10-snap-your-windows
Unfortunately no, not natively. See e.g.: https://answers.microsoft.com/en-us/windows/forum/windows_10-desktop-winpc/snap-assist-to-top-and-bottom-in-portrait-mode/3ecdd25e-8886-4ef1-a7db-0d2e168ce381.
There are third-party solutions, such as https://www.displayfusion.com/Discussions/View/portrait-mode-and-windows-snapping/?ID=8e0ff0b8-5988-43d9-bd54-4567d7869f48 and https://www.nurgo-software.com/products/aquasnap
This is now natively supported in Windows 11. Press Windows+Z, then you can select where you want your window to be. There are several other portrait-only layouts too (the spot that is dark blue is the one my mouse is hovering over):
Not in the way that you snap windows to the left and right; if you try to snap a window to the top by dragging it to the top of your screen it will just maximize that window...and dragging to the bottom won't work at all.
One way that I can think of that will work is minimize 2 windows that you want to split and resize them both so that they span the width of the screen and approximately half the height of the screen. Then drag each window to the desired portion of the screen. To make things easier, you might want to have the window that you want on the bottom of the screen open over the one that you want on top of the screen before you start minimizing windows.

Drawing a Rectangle that never dissapears

I have to draw a transparent square, that never disappears from the user's interface, by clicking to other windows the rectangle remains, only the windows/application content has to be shown behind.
I have thought of doing it with OpenGl or Flex or Canvas , but the problem is whenever I click on another window the programmed rectangle disappears .The rectangle has to act as a default image but has to be always at the foreground.
Do I have to mess with the operating system(Linux, Mac or Windows), by creating this image as default?
here is one example
http://i42.tinypic.com/15g3vxh.png
You can do that with Java pretty easy. See this link for code examples. If you got your transparent Image, you can use the setAlwaysOnTop(true); Method on the Object, and you are good to go. The only things that could get in front of that are other Applications that are using that method.

Virtual buttons not appearing on emulated Android 4.2 system

I have created an Android 4.2 AVD. For the need of my current project, the main screen orientation is landscape. The software keys option is selected.
The mode is set to xhdpi, like a Galaxy Nexus phone.
As I start the emulator, I see a black stripe on the right where the buttons should appear, but it remains black. Thus, there is no way to trigger a Back action since the emulated physical keys are disabled.
The problem can be fixed by configuring the emulator in portrait mode then rotate it once started; the buttons appear as expected. This causes problems since the window is automatically scaled down to fit on my monitor; I did not find any shortcut to restore 1:1 scaling at runtime, after the rotation is done. This is important since I would like to see pixel-perfect results.
I am using SDK version 21 and platform-tools version 16.0.2, as updated yesterday.
Found the solution myself... this is a workaround that allows getting 1:1 scale and the software buttons working.
Leave the AVD (Galaxy Nexus or cloned from it) on portrait mode.
Run the emulator from the command line, using the -scale 1 option; this is the magic that forces 1:1 pixel perfect ratio even if the window does not fit in screen at startup. By default, automatic downsizing happens to fit the monitor.
Rotate the display using Ctrl+F11 or Ctrl+F12 to get landscape mode.

Upside-down splash screen with Cocos2d

I'm using cocos2d v1.0.1 for the iPhone. My app needs to support landscape left and right only. I'm adding the splash image in a rotated portrait mode so when the splash image is removed I can load a background image that is identical to it and do some animations so it appears seamless.
The problem is the splash screen is ALWAYS upside-down in relation to the background image I add. This is regardless of if my rotated portrait image is rotated left or right.
I'm using the default rotation code and setup for cocos. Any help is greatly appreciated!
I will suggest to duplicate the image and name it differently. And use it as per your need instead of using the default.png. It caused problem with me also. Instead of wasting my time I just used this way. Hope this helps. :)

Menu Bar Height in the LWUIT Form

Application develop in the J2ME using LWUIT. When I port this application on the Samsung Device it create the following problem.
int h = Display.getInstance().getDisplayWidth();
It returns 388 for the Samsung GT S5250. So when I draw an image using this dimension it displays a white strip at the bottom of the screen. When I call the Form.show() it displays correctly and height is 400 so how to resolve this issue.
I want to know how the Form size is calculated in LWUIT and how it takes MenuBar Height and white strip display at bottom of the screen.
I think you typed getDisplayWidth() where you meant to type getDisplayHeight().
Regardless, the problem you are seeing is due to a bug in the samsung device. LWUIT invokes the full screen mode in MIDP which hides the native title area, however that doesn't always happen immediately in some devices and thus LWUIT gets incorrect information from the devices. A refresh usually solves this and by the time LWUIT draws on the screen the size is corrected.
Generally the solution is rather simple, create generic code to create your image and if the image dimensions are inappropriate when you are about to draw to the screen then just recreate the image on the fly. This will also solve the issue of device rotation which might pose a problem too.

Resources