I have designed and completed a system in which users can move dialog boxes found on custom maps (such as mine). Given this doesn't use "click and drag" functionality, I have created a system that's user-friendly, effective and reduces as much lag as possible.
First you need to make a simple dialog box that locks and unlocks the dialog boxes. This dialog only needs a basic label and checkbox.
Secondly, all affected dialogs need a button labeled as "Move" in the direct center of the dialog. Be sure to hide this button when the dialog is initially created
Once the checkbox is checked or unchecked, run this trigger:
Once the appropriate dialog boxes have been unlocked, the "Move" buttons you made in the previous step is now visible to the user. The goal at this point is to setup for the final trigger when the user clicks on the Move button.
The next trigger you want to setup is:
PrepareDialogMoveEventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditions(Useddialogitem)==(MoveButton)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfisDialogMoved==falseThenVariable-SetisDialogMoved=trueUI-Display(Text"Click the Middle Mouse button to..."withcolor(28%,100%,100%))for(Playergroup((Triggeringplayer)))toSubtitleareaDialog-Set(movebutton)textto"Set"for(Playergroup((Triggeringplayer)))ElseVariable-SetisDialogMoved=falseDialog-Set(movebutton)textto"Move"for(Playergroup((Triggeringplayer)))
Now the user will be instructed to click anywhere on the screen (using the Middle mouse button) to place the respective dialog to the new location. The reason the middle mouse button is used it to prevent lag as the middle mouse button is one of the more uncommon mouse clicks.
When the user clicks, the dialog will appear at the location the user clicks on the screen. Also, the dialog will be center at the location of the click for optimal user-friendliness.
Yea I definitely wanted to do that, but I'm not sure how that can be done given the tools blizz has to offer. At least to my knowledge, I couldn't figure out anyway to retrieve the cursor location in real-time. Of course, if I'm wrong on this, please let me know, I definitely would like to add that functionality :)
EDIT: Actually thinking about it, I'm pretty sure trying to retrieve the real-time location of the cursor would cause too much lag. Another approach (if it's possible) though is modifying the actual cursor graphic
if you know how my system work, basically you freeze the camera, use the system to get mouse position in relative to the camera, and then convert them appopriately to screen position, then update your dialog accordingly in real time
I have designed and completed a system in which users can move dialog boxes found on custom maps (such as mine). Given this doesn't use "click and drag" functionality, I have created a system that's user-friendly, effective and reduces as much lag as possible.
First you need to make a simple dialog box that locks and unlocks the dialog boxes. This dialog only needs a basic label and checkbox.
Secondly, all affected dialogs need a button labeled as "Move" in the direct center of the dialog. Be sure to hide this button when the dialog is initially created
Once the checkbox is checked or unchecked, run this trigger:
Once the appropriate dialog boxes have been unlocked, the "Move" buttons you made in the previous step is now visible to the user. The goal at this point is to setup for the final trigger when the user clicks on the Move button.
The next trigger you want to setup is:
Now the user will be instructed to click anywhere on the screen (using the Middle mouse button) to place the respective dialog to the new location. The reason the middle mouse button is used it to prevent lag as the middle mouse button is one of the more uncommon mouse clicks.
Finally, setup the following trigger:
When the user clicks, the dialog will appear at the location the user clicks on the screen. Also, the dialog will be center at the location of the click for optimal user-friendliness.
That's all there is to it! :)
This is cool idea, though does not look instructive for users when you cant see the outline while moving
Yea I definitely wanted to do that, but I'm not sure how that can be done given the tools blizz has to offer. At least to my knowledge, I couldn't figure out anyway to retrieve the cursor location in real-time. Of course, if I'm wrong on this, please let me know, I definitely would like to add that functionality :)
EDIT: Actually thinking about it, I'm pretty sure trying to retrieve the real-time location of the cursor would cause too much lag. Another approach (if it's possible) though is modifying the actual cursor graphic
@Zurom: Go
Its not possible atm, I'm just saying.
Though there's way to use my mouse tracking position and match it properly to the screen, however camera has to be fixed during that duration.
@progammer: Go
Hmm, how do you go about doing that?
if you know how my system work, basically you freeze the camera, use the system to get mouse position in relative to the camera, and then convert them appopriately to screen position, then update your dialog accordingly in real time
Sorry, I'm unfamiliar with your system :(
@Zurom: Go
You can try, its really noob friendly, and really helpful for track mouse position, things we cant do without a mouse click
Sorry, I'm a little confused. Is this something I have to download or a site I have to visit? :S