Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Open rightClick menu next to player on map…


damian666
 Share

Recommended Posts

OK, this has been a while, but i am stuck XD

I'm trying to open a Right click menu NEXT to player who is clicked.
but the damn thing wont align XD

i tried curX/curY, i tried sending coordinates with server, tried multiplying it with 32, because of tilesize…

it just wont work, it opens in left top corner, which is actually normal, seeing I'm using coordinates to update the top and left properties of the PicBox.

anyone know what math i have to use to get to the right spot?

i stink at that stuff XD

any help is appreciated ^^

Damian666

edited for spelling
Link to comment
Share on other sites

well depending how big your rightclick menu is just edit it to your needs

i dont know if yours sending any packets or anything, if you are then jsut carry it on. i take it you can figure out whats what :P

FIRST OF ALL! MAKE SURE THE RIGHT CLICK PICTUREBOX IS INSIDE PICSCREEN, otherwise this wont work. i mean like. create it inside the picture box. you should know what i mean.

anyway here we go XD

just add this to
Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, y As Single)

```
If Button = 2 And Not InEditor Then
        frmMirage.PicRight.Top = (y - 60)
        frmMirage.PicRight.Left = (X + 15)
        frmMirage.PicRight.Visible = True
    End If

```
ofcourse it would make more sense though to send X and Y through a packet first to make sure theres a player where your clicking. :P

like the packet_search i think its called :)

want me to just post the whole lot? XD
Link to comment
Share on other sites

well… i allready do send the x and y tru playersearch ^^

but this also doesnt work... hmm... WTF XD

```
If Casestring = "rightclick" Then
        frmDestiny.PicRightMenu.Left = Parse(2) + 15
        frmDestiny.PicRightMenu.Top = Parse(3) - 60
        frmDestiny.LblRightClickname.Caption = Parse(1)
        frmDestiny.PicRightMenu.Visible = True
        Exit Sub
    End If

```
the parse stuff is x and y ofcourse, which is send from the sub you posted, i just check if there is a player there first.

weird stuff…

also, ill add ya if ya like, but im like never on msn mate XD

Damian666
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...