Hi,
If the confirmation emails are not being sent, it must be a sourceforge oddity. If you email your details I should be able to manually set up your account.
There has been a bit of discussion about chat box style widgets. You could use a MultiLineEditbox in Read-only mode. Possibly your best bet is to use the Listbox for displaying the chat history and an edit box (obviously) for text entry. The basic Listbox text item provided does not word-wrap but it's a trivial thing to write a sub-class that does this.
Static text is due to get multi-line support shortly.
All widgets should work with default construction. Anything else is a bug
HTH
CE.
Chat box
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Chat box
Possibly your best bet is to use the Listbox for displaying the chat history
That's what I am doing and it works perfect!. Nice thing is that you can set every text line (i.e. listbox entry) to have a different text color, very handy for a console system (errors display red, warnings orange, infos grey, etc.), or maybe a chatbox?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Chat box
There are many powerful possibilities, especially if you think outside the (list)box a little (terrible pun, I know ).
You could devise a new ListboxItem that allows you to have more than just a single item of text, and / or colours etc. This way, in a chat system, you can set the name of the player and the chat text for an item, have player names different colours, or whatever. With a tiny bit of effort, there's plenty of variations on what can be achieved, and basically that simple Listbox ends up being something entirely different. I guess the best advice is that you should not be afraid to experiment
You could devise a new ListboxItem that allows you to have more than just a single item of text, and / or colours etc. This way, in a chat system, you can set the name of the player and the chat text for an item, have player names different colours, or whatever. With a tiny bit of effort, there's plenty of variations on what can be achieved, and basically that simple Listbox ends up being something entirely different. I guess the best advice is that you should not be afraid to experiment
- Emmeran
- Quite a regular
- Posts: 46
- Joined: Wed Jan 12, 2005 12:06
- Location: Germany, near Nuremberg
- Contact:
Chat box
I like the idea of a listbox as a chatbox, because I can change the color of each row... but how can I disable the frame?
btw: is it anyhow possible to change the color of single parts of a line? If not, is it planned for future?
btw: is it anyhow possible to change the color of single parts of a line? If not, is it planned for future?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Chat box
Disabling the frame: This depends There's no actual method to disable the frame on a per-control basis at the moment, though if you want to disable the frame on all instances of the widget you could edit the imageset definition and/or image file. Antoher alternative is to copy the copy the code for the listbox widget and create a new version that doesn't draw a frame.
To have multiple colours in an item, you need to create your own ListboxItem based class. Within this class you can do anything you need to, including multiple colours. If I were to need such a thing, and say I wanted the name of the person speaking to be different from the actual chat text, what I would do is have an item with two separate strings; one for the name of the person and the other for the chat text. Then just render these with different colours. There are as many ways of doing this are there are programmers, it's a bit more work than having everything done for you, but it does give the programmer "ultimate power"
CE.
To have multiple colours in an item, you need to create your own ListboxItem based class. Within this class you can do anything you need to, including multiple colours. If I were to need such a thing, and say I wanted the name of the person speaking to be different from the actual chat text, what I would do is have an item with two separate strings; one for the name of the person and the other for the chat text. Then just render these with different colours. There are as many ways of doing this are there are programmers, it's a bit more work than having everything done for you, but it does give the programmer "ultimate power"
CE.
- Emmeran
- Quite a regular
- Posts: 46
- Joined: Wed Jan 12, 2005 12:06
- Location: Germany, near Nuremberg
- Contact:
Chat box
well I made a class with color
wasn't that difficult but now that u said it is possible, I'll search the api, how to color single words best... thx!
Code: Select all
class MyListItem : public CEGUI::ListboxTextItem
{
public:
MyListItem(const CEGUI::String& text, CEGUI::colour color = CEGUI::colour(1,1,1)) : ListboxTextItem(text)
{
setSelectionBrushImage((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MultiListSelectionBrush");
setTextColours(color);
}
};
wasn't that difficult but now that u said it is possible, I'll search the api, how to color single words best... thx!
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 5 guests