Right Click Menu
From VbGORE Visual Basic Online RPG Engine
Define the window as you normally would. <vb> Case ClickWindow
With GameWindow.Click
about = TargetCharIndex
Engine_Render_Grh .SkinGrh, inx, iny, 0, 1, True, GUIColorValue, GUIColorValue, GUIColorValue, GUIColorValue
'request trade with str1
If Engine_Collision_Rect(MousePos.X, MousePos.Y, 1, 1, inx + 5, iny + 5, Engine_GetTextWidth(Font_Default, "Close"), 16) Then
Engine_Render_Text Font_Default, "Add As Friend", inx + 5, iny + 5, D3DColorARGB(255, 255, 0, 0)
If MouseLeftDown > 0 Then
'add friend code here
ShowGameWindow(ClickWindow) = 0
End If
Else
Engine_Render_Text Font_Default, "Add As Friend", inx + 5, iny + 5, -1
End If
If Engine_Collision_Rect(MousePos.X, MousePos.Y, 1, 1, inx + 5, iny + 25, Engine_GetTextWidth(Font_Default, "Trade " & str1), 16) Then
Engine_Render_Text Font_Default, "Trade " & str1, inx + 5, iny + 25, D3DColorARGB(255, 255, 0, 0)
If MouseLeftDown > 0 Then
sndBuf.Put_Byte DataCode.User_Trade_Trade
sndBuf.Put_String str1
ShowGameWindow(ClickWindow) = 0
End If
Else
Engine_Render_Text Font_Default, "Trade " & str1, inx + 5, iny + 25, -1
End If
'profile code
If Engine_Collision_Rect(MousePos.X, MousePos.Y, 1, 1, inx + 5, iny + 45, Engine_GetTextWidth(Font_Default, "Close"), 16) Then
Engine_Render_Text Font_Default, "About" & str1, inx + 5, iny + 45, D3DColorARGB(255, 255, 0, 0)
If MouseLeftDown > 0 Then
ShowGameWindow(profilewindow) = 1
ShowGameWindow(ClickWindow) = 0
End If
Else
Engine_Render_Text Font_Default, "About" & str1, inx + 5, iny + 45, -1
End If
'close the window
If Engine_Collision_Rect(MousePos.X, MousePos.Y, 1, 1, inx + 5, iny + 65, Engine_GetTextWidth(Font_Default, "Close"), 16) Then
Engine_Render_Text Font_Default, "Close", inx + 5, iny + 65, D3DColorARGB(255, 255, 0, 0)
If MouseLeftDown > 0 Then
ShowGameWindow(ClickWindow) = 0
End If
Else
Engine_Render_Text Font_Default, "Close", inx + 5, iny + 65, -1
End If
End With
</vb>