Total Annihilation Spring

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
jouninkomiko
Just popping in
Just popping in
Posts: 4
Joined: Sun Dec 18, 2005 19:37
Contact:

Total Annihilation Spring

Postby jouninkomiko » Mon Dec 19, 2005 05:24

Hi, I'm a developer for TA Spring http://taspring.clan-sy.com I'm currently revamping the GUI and decided to use CEGUI, but haven't been able to find a certain kind of functionality. Is it possible to have something like tabbed pages, but except for tabs, have left/right arrows to change between pages?

User avatar
MandM
Just popping in
Just popping in
Posts: 13
Joined: Mon Nov 21, 2005 11:17
Location: Egypt
Contact:

Re: Total Annihilation Spring

Postby MandM » Mon Dec 19, 2005 06:55

you can do that manually. Have 2 Buttons and set thier images to left/right arrows. Then subscribe event handlers to them to do the effect you wanted.

User avatar
jouninkomiko
Just popping in
Just popping in
Posts: 4
Joined: Sun Dec 18, 2005 19:37
Contact:

Re: Total Annihilation Spring

Postby jouninkomiko » Wed Dec 21, 2005 04:20

just checking if i had an easy way out already :) i also have a few more questions. i'm starting to get more of a feel for the cegui system and am about to start writing test apps before i dive in, so here goes:

1) i know i'm going to inject mouse and key presses to the gui. however, i want all mouse actions to go to the game engine if it is not made on an active gui window, and all key presses to go there as well if the chat window is not active. if i have a blank window as the parent of everything else, and subscribe key/mouse events to it, would it receive those events if none of its children do?

2) i understand how layouts and imagesets work into the system based on the examples i've seen, but how falagard and scheme files come in doesn't seem to be documented anywhere. would someone mind please giving a quick rundown?

Thanks

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Total Annihilation Spring

Postby lindquist » Wed Dec 21, 2005 05:05

1)
the inject... methods return true if the event was used by the system, or false if not.
You can use this information to determine whether to pass it on to the game or whatever...

Another approach would be to subscribe event handlers for your GUI sheet and then handler the game input from the event subscribers

the first one is probably favorable, and avoids potential problems if you modify the gui in the game input handling.


2)
Falagard is the new skinning system for CEGUI. it allows you to have many different look'n'feels for a widget type without writing a new window factory each time. This means that you implement the widget once (in a DLL for example), and then choose how it looks and feels from a XML based format.

Falagard is a fairly advanced system, but there is an excellent manual, and tutorials are coming. All this can be found in the wiki

Schemes is the CEGUI prefered way of managing resource packages. It just makes it easy to load a bunch of different font, imageset, look'n'feels, windowsets, and to map windowfactories (the product of windowsets) to the different look'n'feels. All the resources loaded by a scheme are automatically unloaded when it is destroyed.

Schemes are commonly used to "pack" the resources required for a skin in one package allowing resource management on a pre skin basis.

This is the approach taken by martignasse's testaskin tool.

You can find a reference for the scheme XML format in the wiki as well.

User avatar
jouninkomiko
Just popping in
Just popping in
Posts: 4
Joined: Sun Dec 18, 2005 19:37
Contact:

Re: Total Annihilation Spring

Postby jouninkomiko » Wed Dec 21, 2005 08:19

ok great, that was exactly the information i needed. also, about windowfactories... what's the deal with those? the name is kind of obvious, but when do they need to be written, and what are they composed of?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Total Annihilation Spring

Postby lindquist » Wed Dec 21, 2005 11:29

You never allocate a Window yourself in CEGUI. A windowfactory does that for you.

When you create a window type in CEGUI (a widget), you derive a class from one of the basic window types provided by cegui. (for example CEGUI::PushButton). The preferred way to go on is then to derive the final type from this new class and implement the rendering functions (using the Falagard API).

All thats needed now is to write a WindowFactory that allocates the new window type for WindowManager.

You don't need to worry about writing WindowFactories unless you're creating new types of widgets.

In a scheme, you can specify which windowfactories to import. If all you need is a button, then you don't have to load all available window factories (which is the default behaviour) but only those you need.

HTH

User avatar
jouninkomiko
Just popping in
Just popping in
Posts: 4
Joined: Sun Dec 18, 2005 19:37
Contact:

Re: Total Annihilation Spring

Postby jouninkomiko » Wed Dec 21, 2005 21:12

Okay, I'm almost positive I'm going to need to create a few of my own custom widgets. Is there any sample source out there doing this? Also, is there a cegui irc channel someplace?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Total Annihilation Spring

Postby lindquist » Thu Dec 22, 2005 17:10

unfortunately we have no widget sample code. You'll have to look at the ones that are in the library already.

#cegui @ irc.freenode.net


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests