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

Editing GUI


vulcano
 Share

Recommended Posts

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. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

I can't be more specific because I haven't got VB6 or the engine downloaded. Hopefully someone else can guide you more precisely.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

It's in modGeneral! ![:o](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ohmy.png)

```

' 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

```
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...