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

Making a combat text box…


zade_o
 Share

Recommended Posts

Sooo I completely rearranged the GUI and I put in a new text box for BattleMsgs isntead of showing them on the game screen. Only problem is no matter what I do, the new client won't compile… any suggestions? like, how exactly do I add text to the text box? cus the way i thought you did it isn't working............
Link to comment
Share on other sites

just add a textbox, and then change in the server side the code for Battlemsg() and the packet that is send there to the client…
so it blits out in the texbox instead of on the screen :)

should work i guess...

EDIT: oops you asked how to add text to the textbox eeuh

```
Dim Text as string
frmMirage.text1.text =  Text

Text = Text & vbCrLf & Msg

```
pretty basic actually…
Link to comment
Share on other sites

actually i got a new problem with it. I get a helluva lot of the same lines in game.
this is what i changed the section of code to
```
                        If BattlePMsg(i).Index > 0 Then

                            If BattlePMsg(i).Time + 12000 > GetTickCount Then
                                'Call DrawText(TexthDC, 1 + sx, BattlePMsg(i).y + frmMirage.picScreen.Height - 15 + sx,
                                Dim s As String

                                s = Trim$(BattlePMsg(i).Msg)
                                frmMirage.txtCmb.Text = frmMirage.txtCmb.Text & s & vbNewLine

                            Else
                              BattlePMsg(i).Done = 0
                            End If
                        End If

                        If BattleMMsg(i).Index > 0 Then
                            If BattleMMsg(i).Time + 12000 > GetTickCount Then
                                'Call DrawText(TexthDC, (frmMirage.picScreen.Width - (Len(BattleMMsg(i).Msg) * 8)) + sx, BattleMMsg(i).y + frmMirage.picScreen.Height - 15 + sx, Trim$(BattleMMsg(i).Msg), QBColor(BattleMMsg(i).color))

                                s = Trim$(BattleMMsg(i).Msg)

                                frmMirage.txtCmb.Text = frmMirage.txtCmb.Text & s & vbNewLine

                            Else
                              BattleMMsg(i).Done = 0
                            End If
                        End If
```
Link to comment
Share on other sites

i have no idea what you are talking about, you mean that when you get 1 message, it always repeats that message even when it doesn't have to pop up.

Or do you mean thats its annoying when there comes 2 times "You blocked…" ?

PS: i'm posting this before watching the code.

- Tyr
Link to comment
Share on other sites

naw i meant that it posted "jew couldn't hurt you" about 4000 times lmfao. Well i got that fixed. I changed the 12000 to 33 and it works (i changed to 100 and it posted 3 times so i divided 100 by 3)

But now this leaves me with yet 1 mroe problem which I feel will be the last. It adds the lines perfectly, but when it surpasses the height of the box, the focus stays at the top of the box while the list of combat text gets longer. How can I make it jump to the last line everytime?

EDIT-
Nevermind got that just now. alrighty, all good. ProblemS solved. lol.
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...