Editing GUI

DX8

How can I make the buttons like this?

I will use this image:

Just replace the image in the /graphics/gui/ folder.

I altered the image in the folder, but I want to change the position of buttons, to post a side by side

Do you have VB6. Just put the buttons everywhere you want

I want to make this in the Eclipse The Final Frontier

And the buttons dont appear in frmMain

If you want to change the position you’ll need to edit the source code. I’m assuming you’ve got VB6 and know how to use it, if only very basically.

With DX8, everything is rendered to the back-buffer(?), so you can’t just drag and drop the forms like DX7. Within the source code, within modGraphic you’ll find the code that renders everything. It’ll be something with x and y co-ordinates. Just have a look and you should be able to work it out. :)

I can’t be more specific because I haven’t got VB6 or the engine downloaded. Hopefully someone else can guide you more precisely.

I think I have to edit anything in Sub DrawMenu

I cant change, can u help me?

This is the Sub DrawMenu in modGraphic:

! ```
Public Sub DrawMenu()
! Dim I As Long, x As Long, y As Long
! Dim Width As Long, Height As Long
! ’ draw background
! x = GUIWindow(GUI_MENU).x
! y = GUIWindow(GUI_MENU).y
! Width = GUIWindow(GUI_MENU).Width
! Height = GUIWindow(GUI_MENU).Height
! 'EngineRenderRectangle Tex_GUI(3), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_GUI(3), x, y, 0, 0, Width, Height, Width, Height
! ’ draw buttons
! For I = 1 To 6
! If Buttons(I).Visible Then
! ’ set co-ordinate
! x = GUIWindow(GUI_MENU).x + Buttons(I).x
! y = GUIWindow(GUI_MENU).y + Buttons(I).y
! Width = Buttons(I).Width
! Height = Buttons(I).Height
! ’ check for state
! If Buttons(I).state = 2 Then
! ’ we’re clicked boyo
! ‘EngineRenderRectangle Tex_Buttons_c(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons_c(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ElseIf (GlobalX >= x And GlobalX <= x + Buttons(I).Width) And (GlobalY >= y And GlobalY <= y + Buttons(I).Height) Then
! ’ we’re hoverin’
! 'EngineRenderRectangle Tex_Buttons_h(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons_h(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ’ play sound if needed
! If Not lastButtonSound = I Then
! PlaySound Sound_ButtonHover, -1, -1
! lastButtonSound = I
! End If
! Else
! ’ we’re normal
! 'EngineRenderRectangle Tex_Buttons(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ’ reset sound if needed
! If lastButtonSound = I Then lastButtonSound = 0
! End If
! End If
! Next
! ’ draw quest and guild buttons
! I = 42
! If Buttons(I).Visible Then
! ’ set co-ordinate
! x = GUIWindow(GUI_MENU).x + Buttons(I).x
! y = GUIWindow(GUI_MENU).y + Buttons(I).y
! Width = Buttons(I).Width
! Height = Buttons(I).Height
! ’ check for state
! If Buttons(I).state = 2 Then
! ’ we’re clicked boyo
! ‘EngineRenderRectangle Tex_Buttons_c(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons_c(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ElseIf (GlobalX >= x And GlobalX <= x + Buttons(I).Width) And (GlobalY >= y And GlobalY <= y + Buttons(I).Height) Then
! ’ we’re hoverin’
! 'EngineRenderRectangle Tex_Buttons_h(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons_h(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ’ play sound if needed
! If Not lastButtonSound = I Then
! PlaySound Sound_ButtonHover, -1, -1
! lastButtonSound = I
! End If
! Else
! ’ we’re normal
! 'EngineRenderRectangle Tex_Buttons(Buttons(i).PicNum), x, y, 0, 0, width, height, width, height, width, height
! RenderTexture Tex_Buttons(Buttons(I).PicNum), x, y, 0, 0, Width, Height, Width, Height
! ’ reset sound if needed
! If lastButtonSound = I Then lastButtonSound = 0
! End If
! End If
! End Sub


Thanks

Uhm, try and find where the GUI is rendered. I don’t have it downloaded, so I’m flying blind a bit. ;)

It would make sense to tweak your DX8 GUI in modGraphics. Bahaha, sense…

It’s in modGeneral! :o


' BUTTONS

    With Buttons(1)

	    .state = 0 ' normal

	    .X = 6

	    .Y = 6

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 1

    End With

    ' main - skills

    With Buttons(2)

	    .state = 0 ' normal

	    .X = 81

	    .Y = 6

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 2

    End With

    ' main - char

    With Buttons(3)

	    .state = 0 ' normal

	    .X = 156

	    .Y = 6

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 3

    End With

    ' main - opt

    With Buttons(4)

	    .state = 0 ' normal

	    .X = 6

	    .Y = 41

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 4

    End With

    ' main - trade

    With Buttons(5)

	    .state = 0 ' normal

	    .X = 81

	    .Y = 41

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 5

    End With

    ' main - party

    With Buttons(6)

	    .state = 0 ' normal

	    .X = 156

	    .Y = 41

	    .Width = 69

	    .Height = 29

	    .Visible = True

	    .PicNum = 6

    End With

Thanks guy!

Resolved!

Log in to reply