[FIXED] Help with DX8 Buttons

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.

' 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
                           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

are they inside of the GUI Window? that system uses a bounding box type of thing where if it’s outside of the window it’s meant to be on, you can’t interact with it, ofc you could change this by removing a couple lines

Yes they are inside. Look at this   http://snag.gy/Bwcqc.jpg

that is because it is outside of the gui you derp, piece it together lol, there’s a reason there’s a tiny image below the buttons!

Another thread relating to this?

Yeah really. maybe someone should combine the topics into one?

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


Another thread relating to this?

no another relate to frmMain

So who can tell my how can I make those buttons working?

If you can’t understand the basics of a bounding box then there’s no hope in telling you why the buttons don’t work.


because peoples like you i don’t know dx8 basics


You can fix this by learning how the code works 😄
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

where can i get information about dx8 buttons ? give my link.


bum i have fixed it MUHAHAHAHA!! 😄

sorry but im not here to sugar coat your day, but congrats!


where can i get information about dx8 buttons ? give my link.


bum i have fixed it MUHAHAHAHA!! 😄

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.

Again calling people names. Dude no one is gonna help you you’re being ignorant and expecting to have everything handed to you!

Log in to reply