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

[FIXED] Help with DX8 Buttons


Aurelijus1
 Share

Recommended Posts

Why first 4 (case1, case2, case3, case4) not working but other 2 (case5, case6) works fine. I only changed those 4 buttons positions in modGeneral.
Code:
```
' Menu
Public Sub Menu_MouseUp()
Dim i As Long, X As Long, Y As Long, buffer As clsBuffer

   ' find out which button we're clicking
   For i = 1 To 6
X = GUIWindow(GUI_MENU).X + Buttons(i).X
Y = GUIWindow(GUI_MENU).Y + Buttons(i).Y
       ' check if we're on the button
       If (GlobalX >= X And GlobalX <= X + Buttons(i).Width) And (GlobalY >= Y And GlobalY <= Y + Buttons(i).Height) Then
           If Buttons(i).state = 2 Then
               ' do stuffs
               Select Case i
                   Case 1
                       ' open window
                       OpenGuiWindow 1
                   Case 2
                       ' open window
                       OpenGuiWindow 2
                   Case 3
                       ' open window
                       OpenGuiWindow 3
                   Case 4
                       ' open window
                       OpenGuiWindow 4
                   Case 5
                       If myTargetType = TARGET_TYPE_PLAYER And myTarget <> MyIndex Then
                           SendTradeRequest
                       Else
                           AddText "Invalid trade target.", BrightRed
                       End If
                   Case 6
                       ' open window
                       OpenGuiWindow 6
               End Select
               ' play sound
               PlaySound Sound_ButtonClick, -1, -1
           End If
       End If
   Next
```
Link to comment
Share on other sites

there is no tiny picture below the buttons it's DX8 NOT DX7

* * *

and no matter how I put those buttons in the corner they work perfect, but then I move when further from corner them stops working. **I can change them places with other buttons and they still works the same, if there is tiny buttons below picture, then, then I change them places they should open different gui but they don't. If anyone have suggestion how can i fix it please tell my without calling my derp**

* * *

@'BeNjO':

> Another thread relating to this?

no another relate to frmMain
Link to comment
Share on other sites

You can fix this by learning how the code works :D
We're not here to hold your hand through the process of you making your game, you want to make, you have to fix it, we give you hints towards fixing it, you choose to be lazy and want the answer right away, which is why i won't help you
Link to comment
Share on other sites

@'Aurelijus1':

> where can i get information about dx8 buttons ? give my link.
>
> * * *
>
> douchebag
>
> * * *
>
> bum i have fixed it MUHAHAHAHA!! :D

Well, aren't you helpful to everyone who wants to know the answer to your question. Rather than calling people jerks then being one, call them jerks then not be one to people later on.
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...