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.
[08:43 am]
TheHappy115 -- Yea, thats the issue. Thanks. It would also explain why my deleted map couldn't get updated. Updated version reduced collision on units (only thing added) since was dodging game (players collide with each other)
[05:26 am]
Ultraviolet -- If so, I'd just focus on getting them on scmscx.com and then you can link to that in the showcase thread for your maps
[05:25 am]
Ultraviolet -- I can't upload my EUD maps, I think the DLDB has some issue with handling them. Are you trying to upload EUD maps?
[2024-5-28. : 2:06 am]
TheHappy115 -- Its been awhile but ever since I requested one of the Maps I posted to be deleted since I couldn't delete it myself (or update it), I haven't been able to upload any more maps. Any reason for that?
[2024-5-26. : 7:14 pm]
Kyradax -- Hi
[2024-5-26. : 5:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
[2024-5-22. : 6:10 am]
Riney -- Somethings never change.
Please log in to shout.


Members Online: Ultraviolet, Roy, itzelfmoss