HowTo: Add a ChatWindow class to your project

A forum to store posts deemed exceptionally wise and useful
Post Reply
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

HowTo: Add a ChatWindow class to your project

Post by miko93 »

Well, continuing my series of basic extension classes to Irrlicht (without changing the engine code). This time, we have a basic chat window implementation (add chat lines, scroll, change line color, delete older messages).

See the source here: http://www.computer.mikoweb.de/irrlicht2.php

Maybe, this will be of use for some of you.

miko
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

this seems totally bugged
i get many error while compiling it
seems you forgot a lot of semikolons etc
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

Post by miko93 »

Halan, don't think so. It could rather be a copy'n paste problem, IMO.
What is the first error/line you get?

miko
"Yessir, I'll be happy to make these unnecessary changes to this irrelevant document." (Dilbert)
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

ah good to see some reaction of you :D gimme a second ill implent it again to my project...

huum ah sry seems to be related to my project youre right...where was my mind while compiling this for the last time anyways im using ackis version of a chat box atm...
kamadian
Posts: 7
Joined: Mon Feb 06, 2006 11:57 pm

Post by kamadian »

i would like to know how to, if you press "enter" it allows you to type in a message and press enter again to submit it?

i see the class etc. and everything, but i dont exaxctly understand how you add words to the window :|


i also get a ton of errors, and i didnt copy and paste i typed it all out :P heehee, and changed things where i could where it was possible.

got an error in the .h file

Code: Select all

38 C:\dark chasis\Engine\gui-landscape\CGUIChatWindow.h using-declaration for non-member at class scope 

Code: Select all

38 C:\dark chasis\Engine\gui-landscape\CGUIChatWindow.h expected `;' before "chatLines" 
and then some which are my fault, why would this be?
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

Post by miko93 »

Hi kamadian,

Irrlicht provides a simple command line input itself, named IGUIEditBox. I use this one for getting user input. Then (or if it is a "system message", I use AddChatMessage of the ChatWindow Class. Input itself is not covered by my class.

Concerning compilation errors: Hell, I found out that terms like <irr::gui::IGUIStaticText*> or any others using "<" were incorrectly treated as html tags and not shown. Hence the compilation errors.

The code should now be corrected, and copy'n paste should work.

A big sorry for that.

I really should have provided downloadable files.

miko
"Yessir, I'll be happy to make these unnecessary changes to this irrelevant document." (Dilbert)
kamadian
Posts: 7
Joined: Mon Feb 06, 2006 11:57 pm

Post by kamadian »

hey tis all kool, atm i am using irrilcht alone for a chat system, using the list box and then an edit box and a button :)

gonna try out ur chat system though :D
Post Reply