Hi,
I'd like some advice on how to implement a few things using CEGUI, that happens to be for an MMOG. My needs are complex and what I want to know is which parts of this can CEGUI already do, and which parts can it not do.
I apologize in advance if this is a long post.
Here's the 6 things I need to implement using CEGUI:
1. Chat window:
Displays a list of messages, prefixed by the player's name for each new line. Handles word wrapping. The newest message displays at the bottom. If a word cannot be wrapped, it is split
If I got the following messages in the following order:
1. Hello World. 2. This is a very long line of text that scrolls off the screen. 3. <Blank line> 4. Bob sucks 5. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
The output in the chat window should be
PlayerA> Hello world
PlayerB> This is a very long line of text
PlayerB> that scrolls off the screen.
PlayerA>
PlayerA> Bob sucks
PlayerA> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
PlayerA> aaaaa
Furthermore, the chat window is limited to n lines of text. If a line of text (including a line that was wrapped) causes the number of lines to go over n, those lines are faded out and deleted after some threshold m lines of text is in the buffer.
2. Console input bar:
A console bar which allows the user to enter a single line of input. If this line is longer than the screen, the line is scrolled, rather than wrapped.
3. Chat input frame
User can enter lines of text. Lines of text are wrapped. The background image behind the text input increases in size to match the number of lines entered.
4. Network statistics graphs
Ability to display a bar graph and line graph
5. Server browser table
A table of elements with n columns and m rows. Each column has a clickable header. (I'm pretty sure CEGUI can do this)
6. Buttons with animated textures.
Self-explanitory
Now if CEGUI cannot do these thing above, I can do it myself as long as I have two basic functions:
Text wrapping and scrolling:
1. To have CEGUI wrap a line of text given a particular x coordinate and resolution and tell me how many pixels high the resulting line(s) are.
2. To have CEGUI tell me how many pixels long a line of text is so I can do the scrolling myself.
These last two requirements are simple so I imagine CEGUI can do it, but I want to make sure.
Thanks for any answers!
Questions on what CEGUI can do for an MMOG
Moderators: CEGUI MVP, CEGUI Team
- Dalfy
- CEGUI Team (Retired)
- Posts: 130
- Joined: Tue Oct 11, 2005 16:13
- Location: Paris, FRANCE
- Contact:
1. Chat window:
There is an example of such chat window on the wiki. And the Falagard demo contains a console which can also be used.
2 same falagard Example
3 The image stuff behind I don't think its supported right now but It's should be easy to increase the size of the window after each word wrap or newline
4 I don't think its something easly done right now but it's something that is going to be doable in the next branch. Maybe if you can show a visual of what you would like I can provide a more final answer.
5 Yep you are right a sample already contains something similar
6 Not supported in 0.5 but it's something we want to do in 0.6.
7 Text Wrapping and scrolling is supported.
I hope the answer are clear enough and allow for you to start using CEGUI. For the graph stuff maybe with some more details we can have a better idea of your intent and come with a better answer.
There is an example of such chat window on the wiki. And the Falagard demo contains a console which can also be used.
2 same falagard Example
3 The image stuff behind I don't think its supported right now but It's should be easy to increase the size of the window after each word wrap or newline
4 I don't think its something easly done right now but it's something that is going to be doable in the next branch. Maybe if you can show a visual of what you would like I can provide a more final answer.
5 Yep you are right a sample already contains something similar
6 Not supported in 0.5 but it's something we want to do in 0.6.
7 Text Wrapping and scrolling is supported.
I hope the answer are clear enough and allow for you to start using CEGUI. For the graph stuff maybe with some more details we can have a better idea of your intent and come with a better answer.
http://www.ogre3d.org/wiki/index.php/CEGUIBuildDialog
shows how to display animated images onto Cegui widgets. I'm still using the non-Falagard approach so I would place a StaticImage on top of a PushButton and voila, a button showing an animated texture!
shows how to display animated images onto Cegui widgets. I'm still using the non-Falagard approach so I would place a StaticImage on top of a PushButton and voila, a button showing an animated texture!
-
- Not too shy to talk
- Posts: 23
- Joined: Thu Jun 22, 2006 13:32
- Location: Hungary, Debrecen
- Contact:
Rackle wrote:http://www.ogre3d.org/wiki/index.php/CEGUIBuildDialog
shows how to display animated images onto Cegui widgets. I'm still using the non-Falagard approach so I would place a StaticImage on top of a PushButton and voila, a button showing an animated texture!
I think its can be implemented better with ImageButton where you can define Hover/Normal/Pushed/Disabled Image(where all can be an animated RTT).
Xir.
Thanks for the answers!
Line and bar graphs are well-defined representations of data. I'm not sure what other info you need.
The multi-line edit box is similar to what I need but doesn't quite match it. Maybe CEGUI can do this already. If not, I will be happy to write it myself:
1. User shouldn't be able to select text.
2. Text should be scrollable either way (down or up). I see that to scroll old text up, you append to the printed string. This is fine. However, if I were to prepend to the front of the string the scroll bar would still stay at the bottom. The net result would be the scroll bar height would decrease a bit but the user would still see the same text.
3. There shouldn't be a background or scroll bar at all. All I want is the text.
4. Old text past n lines of text should fade out. If I am appending all lines of text to the same string then I can't control which text fades and which does not.
So assuming I wrote this myself, is my best bet to go with CEGUI::Font and start reading line lengths and splitting stuff?
Line and bar graphs are well-defined representations of data. I'm not sure what other info you need.
The multi-line edit box is similar to what I need but doesn't quite match it. Maybe CEGUI can do this already. If not, I will be happy to write it myself:
1. User shouldn't be able to select text.
2. Text should be scrollable either way (down or up). I see that to scroll old text up, you append to the printed string. This is fine. However, if I were to prepend to the front of the string the scroll bar would still stay at the bottom. The net result would be the scroll bar height would decrease a bit but the user would still see the same text.
3. There shouldn't be a background or scroll bar at all. All I want is the text.
4. Old text past n lines of text should fade out. If I am appending all lines of text to the same string then I can't control which text fades and which does not.
So assuming I wrote this myself, is my best bet to go with CEGUI::Font and start reading line lengths and splitting stuff?
Who is online
Users browsing this forum: No registered users and 13 guests