Sprite background image lags on mouse hover - dom

I have basic DOM menu that has sprite background images for the first level of "LI"s.
It works just fine, but I guess there is some problem and instead of switching the image right away on hover it goes blank and after about a second the hover image "appears" (shifts).
That happens only on first hovering. After that it's smooth like it's supposed to be.
Refresh the page and there it is again...
Frustrating...
Here is a link to check it out: http://goo.gl/6FAM
The problem exist on Firefox v3.6.3.
Chrome 5.0.375 and IE 8.0.7600 don't have this issue.
Any ideas?

It's because the hover background image is not loaded until you pass the mouse on the button.
An easy solution is to use CSS sprites, so you will only have 1 image to deal with.

Related

Unity UI panel transparency

I'm working on my game and I want to add an inventory type system, when I added the panel it was a little transparent while the one in the video was watching was not. I didn’t see any setting for transparency in the Unity inspector for both the canvas and the panel. The UI mode is an overlay
I didn’t try much other than clicking all the check boxes, and I was excepting for the up to be a solid color.
If you have a Canvas Group in your hierarchy, it can come from here (Alpha property).
I needed to go to colors and slide this slider all the way up or down (the slider you need to change)

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.

UI GameObject not visible in scene tab

I am working on a networking game where a roomListItem shows all the available gamerooms online. for every gameroom a button gets instantiated inside the roomListItem and this happens as intended, the problem is that the button that gets instentiated is invisible, i can resize it but still can't see it.
i already tried moving the button at the bottom of the hierarchy but it's still not visible.
The problem is that you are masking all the content, there is an object named Viewport that contains a mask component, this component causes that all UI elements below it will be masked, you can try:
Remove it.
Change the sprite for another one if you like to mask it in some way.
GIF here: https://share.getcloudapp.com/YEu8JPXN

Unity UI List Element not showing unless I change screen size

I have a UI Scroll View in Unity showing a list of Toggles that I dynamically populate. My problem is that when I instanciate a new element in this list, it is in the inspector but it is not rendered on the screen ?
This happens also when i manually add a ListElement GameObject to the content element of the list.
What is very weird is that if I move the window so that the screen size changes, it is drawn... Cf. the two screen shots.
On the first screen shot, I added a ListElement prefab, like you can see, it is not drawn but it is there and active.
Then I resized the Editor Window and it magically pops up... This happens also on a build of the game (on Android for example, it is drawn when screen orientation changes but not before...).
I tried to Force canvas redraw, LayoutForceRebuild but it doesn't work. The fact is that i have no idea why this is happening...
Screen shot 1 :
Screen shot 2 : the red arrow shows what I did to make it drawn
Screen shot 3 : with Show mask enabled on the view port
Screen shot 4 : same as 3 but after resize
I met with this problem too and finally solved it, dunno whether it's a same situation.
I find the window or UI Elements repaints only when refered variables are changed. So when it comes to the ListView, it is not called "OnValueChanged" if you add elements to [ListView.itemsSource]. The solution is to new a list and assign to [ListView.itemsSource].

Dealing with Popup in Corona game engine

I have a screen in Corona to display a puzzle, and once user guess the correct answer, I'm going to display a simple pop up on the screen to do the congratulation a long with close button to dismiss the popup, now I need for a simple work around to disable any control or behaviour on the original screen while displaying the popup, how can I do that?
I think you need to do this by stop or pause transitions, timers and animations etc. before you go to scene with pop up.
You can add transparent rectangle from transparent image file (not just rectangle, as it will not be touchable).
Size of this rectangle must be the size of all screen.
Position of rectangle - under your popup (or better make it as part of your popup).
Add listeners to this rectangle on touch and tap that will just return false - so it will prevent any clicks under it.
That will save you from pausing / disabling buttons, that you don't want to disable/pause.