[EA] Add button

Hello,

I’m using Eclipse Advanced, and I want to add new buttons on the main. (like inventory, skills etc)

Thank you for your help. :)

Your going to need to get a copy of VB6 and do it that way. Its not very hard, its a drag and drop system.

If you have VB6, find the name of one of the buttons you mentioned, and see how it works. You can use that as a guide to put in a new button. Let me know if you run into any problems!

Yeah I’ve VB6.

So, I found in ModConstant

' GUI

Public Const MAX_BUTTONS As Long = 45

I changed to 46.

Then in modGeneral I’ve found```

’ BUTTONS

’ main - inventory

With Buttons(1)

.state = 0 ’ normal

.X = 115

.Y = 6

.Width = 27

.Height = 29

.visible = True

.PicNum = 1

End With

(there is 45buttons like this)

So, I've add this after the End With```

With Buttons(46)

.state = 0 ' normal

.X = 10

.Y = 6

.Width = 24

.Height = 29

.visible = True

.PicNum = 27

End With

But it do not appear. 😕

Am I supposed to do other things ?

Thank you for your help and sorry for my dirty english. u_u

You need to set the graphic for the image. Look in your GUI folder, and look at the names of the button images. Look for those in your source. Then again, I’m only familiar with 2.0 and EclipseVB.

3.0 might work differently.

I did, I’ve created a pic which i’ve nammed 27.png / 27_h.png / 27_c.png .

its b/c you didnt ,make a render those are just bout the button image not drawing it…. look at one of the buttons and track it around and see where the rest of the code like for example, Mouse down, mouse up, the render code the call for it . srry i cant explain more but you should be able to follow it.

o-o

In Sub DrawMenu I’ve found

' draw buttons

For i = 1 To 6

Can someone help me to add the number 46 to this please? x_x

Thank you.

Gah ill just pm you o-o ,

At the bottom, underneath of “Next i” simply use


For I  =  46 to 46

    'the drawing method for your new button(s).

Next I

In case you add more than just 46 we’ll make it a for loop

Why are you looping from 46 to 46? lol

The loop isn’t necessary unless there are more values than 46 that is to be rendered together.

Why are you looping from 46 to 46? lol

The loop isn’t necessary unless there are more values than 46 that is to be rendered together.

I’m having him use a for-loop in case he decides to add more buttons.

It will only require changing the second 46.(ex For I = 46 to 49)

You don’t have to do it this way, I was just making it easier for future edits.

I’m having him use a for-loop in case he decides to add more buttons.

It will only require changing the second 46.(ex For I = 46 to 49)

You don’t have to do it this way, I was just making it easier for future edits.

True.

Log in to reply