Mouse is offset only in one particular GUI in Unity - unity3d

I have 3 different GUI containers/sections, one for showing resources, one for building, and one for inventory. Clicking anything in the resource and building sections works completely fine, the mouse is where it needs to be and clicking/hovering over a button will actually click/hover over the button.
The problem is only in the inventory GUI. I'm not sure how it's any different, so I don't know what I need to provide here for anyone to help me out, so please ask me for any extra info if you need it in the comments. I'm not sure if this is an issue with the code or the UI elements, or whatever else it might be. I'm going to provide some examples of this happening, though.
Here is a gif of what it looks like in the inventory (ignore the items not doing what they are supposed to): https://s3.gifyu.com/images/ezgif.com-gif-maker-37b00e5b2a1c164b2.gif
Here is a gift of me just hovering/clicking around in the inventory: https://s3.gifyu.com/images/ezgif.com-gif-maker97b27b8783d784c6.gif
Here is a gif of this working in the "Building" section: https://s9.gifyu.com/images/ezgif.com-gif-maker-287d7a9723f9db2b1.gif
Here is a gif of this working in the "Resources" section: https://s3.gifyu.com/images/ezgif.com-gif-maker-18662e4229ebd27a2.gif
Here are some images that might be useful. Here is the layout:
There is no difference when I select, for example, Building and Inventory. Here is a comparison:
I have looked around on Google for about 30 minutes, but I couldn't find anything related to this.

I have found the issue. The issue was with the slot prefab that was in the inventory screen, as it had text that was way bigger than it was: https://prnt.sc/uDRXz2Kr4kQr
I initially hadn't noticed this as simply clicking on the prefab itself shows that it's the right size: https://prnt.sc/BXQqAzMD-kWX
Resizing the text seems to fix the issue.

Related

Dnd-kit Multiple containers: items jump disorderly after quick drag and drops

As seen in the attached video clip, I can move the items in container A to B without any problem. But if the speed of my drag increase, the list in the over container starts to behave abnormally. I tried the example multi container story but didn't capture this type of behavior.
Once the list items start to jump all over the place, if click on an item, it immediately switch place with another one, as the argument {over} is now not itself even in dragStart.
Sandbox: https://codesandbox.io/s/eloquent-kirch-t9r13j?file=/Dnd.js
Video: https://user-images.githubusercontent.com/83575213/170879626-de413f22-1236-4128-baec-c95363e61b47.mp4
Really appreciate any helps. Cheers
Apparently it was the issue from the dnd-kit library at version 6.0.6 or lower.
However this issue has been fixed in v6.0.7, you can see the PR here: https://github.com/clauderic/dnd-kit/pull/788
I had the same issue, it was the problem with arrays not updating after drag end. Dnd navigates by keys and it looks like there are more than 1 element with the same key in one array, that's why it is grabbing 2 elements at ones.

QGIS - layers disappear after loading pre-saved style

First time here, I hope I'm doing it right and I hope I'm allowed to ask this here.
I'm making buffer layers out of points in QGIS 3.8.1 Zanzibar, it's 5 point layers and I need to generate the 5 corresponding buffers. They come out alright, but after I load a previously saved style for the layers the geometries simply disappear.
I have:
Ticked layer off and on, still gone.
Deactivated any other layer and make sure it's not hidden behind something else.
Zoomed to layer, not the problem, it zooms where they should be, they're just not visible
Checked for SRC, it's all good, all of them are the same.
Open attribute table, all the data is there and it's correct.
Left click on layer/layer visibility and made sure it is unchecked as it should, I also tried checking it to no avail.
Made the layers all over again, same result.
Went to Properties/Source/Query Builder and wrote this (I saw this in a vid where it worked):
"FIELD" LIKE "FIELD"
Where "FIELD" is a field of my attribute table, tested it correctly and applied...didn't work either.
Just one seemed to come out alright before doing all this, but I followed the exact same procedure for all of them.
Any ideas? Do I have to re-do the style all over again manually for every layer?
Thanks in advance!
I just found out what was wrong, I hope this helps someone in the future:
The style I saved was classifying data based on a particular column, wich of course, must exist and have the exact same name in the other layers in order to work. I just forgot to generate said column on the rest of the layers.
Cheers and thanks to the editor.

C# flipping mainwindow

this is my very first entry here, may it not be the last....
I am having a bit of a struggle with some GUI stuff.
I really have an animation up front my eyes and it should look like the following: using c# with desktop application.
This Form looks like a login window with server address, username and pw textboxes and with a connect button as well, so nothing special. Size wise it can be small or at least same as size as the turned window. doesnt matter at the end.
once you entered your credentials and all turns out to be fine, connection is there and valid.
The main Form is suppost to flip then (doesnt matter horizontal or vertical),
and shows you your options you got then in this newly window. kind of an animated sign, that you are logged in and have now these options.
But the flip is suppost to stay on the same place. Like a card flip or a coin flip, but just the whole form and it ends then at the same place as before.
(sounds really wired to explain)
This can also be done with a new form poping up, just with a animated turn over, no problem with that.
And this is exactly where I am stuck.
I really cant find any information on how this would look like in code or even in animation.
I am using c# and the basic project started as a desktop application project, which it will be at the end.
Its been a while since my last coding, please be gentle.
i know there are plenty of entries in here also in google as well, but i didnt found anything which will do this for the main window as a total. images etc: yes, but for the whole form: no.
Any help out there?
May be tehr eis a trick i am not aware of? Its been a while since the last coding work, I need to admit that.#greyhairsarecomming
many thanks in advance! much appreciated
kind regards TG

Custom PickerView froze up (With sample project)

Background: I have been wanting a PickerView that is exactly matches that of Safari. I looked through many Gits and found none that work quite as exactly. I decided to build my own. It is complete now, but there is a bug that would not go away.
Problem: If you run the sample project you will be greeted with 2 text fields.
Tap on one of the textfields - it brings up the BTPickerView. Everything works just as you would expect.
Choose the fourth choice, then press done.
Tap on the same textfield. This time, the debug log will show you that you have executed an infinite loop, which freezes the app.
Question: What did I do to cause it? And how do I fix it?
I have tried everything to boil it down. It comes down to this and I could not go any further. Please advise.
Edit: Here is the sample code you can download in case anyone missed the blue link above.
The issue seems to be with the constraints in BTPickerLabel. If you temporarily disable the constraints from BTPickerLabel, code works fine. Enforcing constraint might trigger the reloading of entire picker view infinitely. I hope it should help you to fix the problem.

kineticjs drag & drop - no release inconsistency

First of all drag and drop works correctly in my stages in version 4.3.0, so I just want to understand why I get the following problem with 4.3.3.
I have three stages. One sits in a container in a document in an iframe. The others sit in containers in the iframe's parent document, one displaying a complex layout of shapes and the other a single simple shape for testing. The document in the iframe which controls all the action has a viewfinder overlay that drags and drops correctly. However the shapes in the layout and test stages do not release on mouseup.
Any idea about what's going on would be appreciated ... I like to try and keep up to date.
Well, since I can't see any of your code I can only help so much, try doing the following.
For each shape that you have, add this attribute:
dragOnTop: false
example:
Kinetic.Rect({
fill: 'blue',
dragOnTop: false
});
Let me explain how I found an answer by first amending the structure. There is a holding file which contains shared files and two iframes - one for a machine-like index and one for a display each with its own scripts. The main shared file is nameset.json which lists all the objects and their key/value couplets. These are sent to 'fill out' the machine and display frameworks. I thought I could do the same with the Kinetic Global object, referring to the Global.stages array. It seems obvious now that each of the iframes needs its own Kinetic link (rather than pointer) and these need to be used to marry machine/display interactions like the map shown here. Anyway all the dragging and dropping works smoothly as promoted. Thanks for that!
Will mark as answered but if anyone has any comments would be pleased to read them.