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.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Roy, lil-Inferno