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:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: UndeadStar, Ultraviolet