Staredit Network > Forums > SC2 Assistance > Topic: Move dialog item to mouse
Move dialog item to mouse
Jul 12 2010, 1:45 am
By: Morphling  

Jul 12 2010, 1:45 am Morphling Post #1



I want to move a button to the position of the mouse, but it seems to move it to a random point. FYI the dialog it's attached to it set to fullscreen.
Dialog - Move Button[1] to ((Mouse X position clicked in the UI), (Mouse Y position clicked in the UI)) relative to Top Left of dialog for (All players)

Anyone have a solution?



None.

Jul 12 2010, 2:21 am payne Post #2

:payne:

I do not have a clue on how to solve your problem, but I just wanted to know if the resolution of the screen could affect this.
I thought it might be a useful question for further help. ;o
Sorry if it wasn't. ^^



None.

Jul 12 2010, 8:50 am Devourer Post #3

Hello

First off: I would change top left to bottom left as I am sure that the "0x0-coordinate" is on the bottom left of the screen.
If that doesn't work, maybe the "UI" is just the console on the bottom? No idea, but try the thing above.



Please report errors in the Staredit.Network forum.

Jul 12 2010, 4:53 pm Morphling Post #4



Quote from Devourer
First off: I would change top left to bottom left as I am sure that the "0x0-coordinate" is on the bottom left of the screen.
If that doesn't work, maybe the "UI" is just the console on the bottom? No idea, but try the thing above.
I tested and the origin for the mouse click is at the top left. I also noticed that the farther away I clicked from the origin the less accurate it was.



None.

Jul 13 2010, 9:01 am (U)Bolt_Head Post #5



Quote from Devourer
First off: I would change top left to bottom left as I am sure that the "0x0-coordinate" is on the bottom left of the screen.
If that doesn't work, maybe the "UI" is just the console on the bottom? No idea, but try the thing above.

Usually Y increases as you move down the screen in computer graphics. It seems strange if you compare it to the XY coordinate plane you learned in algebra cause it is backwards.
However the same way you would read Text, objects fill up the screen from the top left corner of the screen and the bottom boundary is calculated by using a known screen height. I've seen this same behavior time and time again and if the origin was the lower left I would feel like that was backwards.

However for the sake of this post, if that was the only problem it would be pretty obvious as you would see a direct mirroring across the horizontal center of the screen.

Edit: Here is a question? and perhaps something to look into.
How large is your dialog or where is it placed? Your trigger reads that you move the button in relation to the dialog. I would suspect if your dialog isn't in the top left corner then it you would get unexpected placements because the Screen Click position isn't the same as the Dialog Position.

Post has been edited 1 time(s), last time on Jul 13 2010, 9:08 am by (U)Bolt_Head.



None.

Jul 13 2010, 5:31 pm Morphling Post #6



Quote
How large is your dialog or where is it placed? Your trigger reads that you move the button in relation to the dialog. I would suspect if your dialog isn't in the top left corner then it you would get unexpected placements because the Screen Click position isn't the same as the Dialog Position.
I set the dialog to full screen and move the button relative to the top left of that dialog so everything should be working correctly, but it does not.

Edit: I did some tests and I found that the button position and the mouse click are infact the same, but for some reason the image of the button is not where scII says the coordinate of the button is.

Post has been edited 2 time(s), last time on Jul 14 2010, 1:01 am by Morphling.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Zycorax, Roy