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.
[02:17 pm]
Zoan -- I find it kind of sad that on the same day it was announced AI solved Navier Stokes, it was also announced AI beat Portal, and there's a good deal of people who don't know which is more impressive
[06:24 am]
Oh_Man -- uh I mean, pfft no i'm not a robot
[06:24 am]
Oh_Man -- 01001001 00100000 01100001 01101101 00100000 01101110 01101111 01110100 00100000 01100001 00100000 01110010 01101111 01100010 01101111 01110100 00001010
[05:02 am]
NimoStar -- vtubers already behave as AIs so nobody would notice the difference
[03:42 am]
Symmetry -- If AI beat portal, then we can do an AI Vtuber
[03:24 am]
NimoStar -- Coming generations? Too much optimism I see
[03:05 am]
Symmetry -- The coming generations will have so much data online that their kids will never have to say goodbye (for a monthly fee)
[02:59 am]
Symmetry -- I mean it's not out of the question I suppose. An LLM could digitally replace people when they die. Imagine dead grandma messaging you to buy crypto
[02:56 am]
Symmetry -- Steadily convincing myself Oh_Man is secretly an LLM
[02:42 am]
Symmetry -- I need an AI to summarize my thoughts, damn it!
Please log in to shout.


Members Online: Obsdark, Zoan, DarkenedFantasies