Jump to content
XCOMUFO & Xenocide

Editing The Taharezlook Layout


Recommended Posts

one thing i found about CEGUI is that it's very non-user-friendly when it comes to editing the standard layouts to make use of your own images.
so i was wondering if anyone with more programming experience, specially with CEGUI, could help me out in getting the Xenocide images to work with the TL layout. mainly because i have no idea on how or where to start to get them to work right, specially if i have to mess around with CEGUI code.
my current issues are:

[b]Layout[/b]
is it possible to make the TL layout go look for images in different imagesets, instead of all being in the TaharezLook one? because, if you've noticed, we have widget images spread all over the various imagesets, and as a non-artist, it's a heck of a lot of work to get them all in the TaharezLook one (best i've got is Flash).

[b]Checkbox[/b]
first of all: the TL checkbox is left-sided. ours is right-sided.
second: checkboxes in CEGUI just have the "checkmark" bit. ours is a full button.
third: we have different images for checkboxes. for instance, we have the standard X checkbox and we have the "speaker" checkbox for the Sound Options dialog. maybe you could make your hack work for checkboxes too, rincewind?

btw, i tried to just put the checkbox images in the TL layout, changed the imageset to fit and *POOF* checkboxes simply didn't show at runtime (only the text). :WTF:

[b]Combobox[/b]
still haven't tried to "merge it" with TL, but one thing i noticed is that standard combobox is automatically sized to fit the font, and thus the text is a bit cropped on top/bottom.

so... can anyone help me with any of these issues, or should i try to get help at CEGUI forums? Edited by SupSuper
Link to comment
Share on other sites

hmmm... not much help, neither here nor in CEGUI forums <_<

well, i'll use this thread to keep you informed on my progress with this. it's currently my top priority since i need to get this done to move on to the Sound Options Dialog and Statistics GUI.

CE told me that, to get all of the UI working and looking like we want it to, it'll take a lot of editing to the TL code. unfortunately, that means that i'll have to build my own TaharezLook DLL. which means i'll have to get CEGUI to build and edit it the TL code. problem is, CEGUI 0.2 (latest version) needs Ogre 1.0 (since the OgreRenderer is now part of Ogre and not of CEGUI). and since our code isn't 1.0 ready, i was wondering if someone could take care of the upgrading?
i know it's still just RC1, but we'll eventually need to upgrade, and i've been checking the Changelog and most of the intended features are done.

back on topic. so far i've made the checkbox right-sided and the slider horizontal, though still haven't been able to test it (for reasons mentioned above). btw, are we gonna need left-sided checkboxes and vertical sliders?

next i'll work on changing the combobox and checkbox size, so that it depends on the images and not on the text.

Vaaish: could you add graphics for the combobox, checkbox and horizontal slider to the TL layout?

RK: should i add this as a task?
Link to comment
Share on other sites

SupSuper, yes add it as a task under art department. About Ogre RC1, Guyver is the package master arround here, so you should contact him to upgrade at least the dependencies package ( or prod him to write an entry in the wiki about how to accomplish the packaging procedure ;) ).

Greetings
Red Knight
Link to comment
Share on other sites

[quote name='red knight' date='Feb 18 2005, 08:21 PM']SupSuper, yes add it as a task under art department. About Ogre RC1, Guyver is the package master arround here, so you should contact him to upgrade at least the dependencies package ( or prod him to write an entry in the wiki about how to accomplish the packaging procedure ;) ).

Greetings
Red Knight
[right][post="111135"]<{POST_SNAPBACK}>[/post][/right][/quote]Added. For further reference, any widget graphics that are not regular buttons should be added to the TL texture file.
My problem isn't the dependencies, i can easily get them and build them myself. My problem is that there have to be major changes to the code for it to work with Ogre RC1, and i already have enough tasks on my hands :)
I'll still prod Guyver though ;)
Link to comment
Share on other sites

[quote name='red knight' date='Feb 19 2005, 12:43 AM']But if he upgrade the dependencies to RC1, we will have no remedy than to update the code ;)...

Greetings
Red Knight
[right][post="111193"]<{POST_SNAPBACK}>[/post][/right][/quote]
:-), as I said, I'm currently in the process of packing everything to go to Paris, so I'll be busy for the next couple of days. I will take a look at the Ogre stuff after monday though.
Concerning the extension of TL, you should probably not edit the TL code directly but rather use inheritance to extend the widgets (i.e. create a subclass of TLButton, etc. together with registering them as widgets with CEGUI (take a look at registerFactory in there). This way, we will still get all updates to the Taharez Look stuff and don't have to have a patched version of CEGUI.

As I said, starting on monday, I am more than willing to assist you, currently though I've just way to much stuff to take care of before I leave.

Rincewind
Link to comment
Share on other sites

Hi guys,

As I posted elsewhere I'm back from holidays and I'm looking at progress and I'm impressed OMFG. :wink1:

Anyway, I'm now compiling Ogre's Azathoth CVS branch (which is the stable maintance branch for Ogre 1.0, I think we can use it now, since no interface changes will be, we can upgrade then at any time to get bug fixes), then I'll be compiling CEGUI head cvs (for SupSuper) and I'll make packages of those for you. Then the great ToOgre1.0Conversion is about to begin.

SupSuper: there's easier way to customize CEGUI's widgets, you can derive from them easily (derive from for example TLCheckBox, but remember to put CEGUITaharezLook.lib to project dependencies as it's required to customize TL widgets), then create factory for your new widget and register it and viola - you've got new widget out of old one without any CEGUI compilation s**t :wink1:. I'll try to make some example code for you when I'm done with dependencies and when we have Xeno working with Ogre 1.0. What do you think?

Greetings,
Guyver
Link to comment
Share on other sites

[quote name='guyver6' date='Feb 21 2005, 10:07 AM']Hi guys,

As I posted elsewhere I'm back from holidays and I'm looking at progress and I'm impressed OMFG. :wink1:

Anyway, I'm now compiling Ogre's Azathoth CVS branch (which is the stable maintance branch for Ogre 1.0, I think we can use it now, since no interface changes will be, we can upgrade then at any time to get bug fixes), then I'll be compiling CEGUI head cvs (for SupSuper) and I'll make packages of those for you. Then the great ToOgre1.0Conversion is about to begin.

SupSuper: there's easier way to customize CEGUI's widgets, you can derive from them easily (derive from for example TLCheckBox, but remember to put CEGUITaharezLook.lib to project dependencies as it's required to customize TL widgets), then create factory for your new widget and register it and viola - you've got new widget out of old one without any CEGUI compilation s**t :wink1:. I'll try to make some example code for you when I'm done with dependencies and when we have Xeno working with Ogre 1.0. What do you think?

Greetings,
Guyver
[right][post="111463"]<{POST_SNAPBACK}>[/post][/right][/quote]thanks, i could use some example code. so far all i've been doing is editing the widgets code directly, and that's probably not the best way to do it.

[quote name='Vaaish' date='Feb 21 2005, 03:11 PM']Supsuper: the graphics you are looking for, minus the slider, should be in teh stats panel graphics.
[right][post="111475"]<{POST_SNAPBACK}>[/post][/right][/quote]yes, but whenever i try to copy them into the layout file they get all messed up, so maybe you could try to do that? all i have is Paint, which isn't very good with PNGs.
Link to comment
Share on other sites

  • 2 weeks later...
progress update:

just to let you guys know what i've done in terms of editing TL (because no1 has explained to me the whole "deriving from the original widgets" whatever :wacko: ). anyways, i've managed to get our own images for the checkbox/combobox into the layout.png, and looking right, more or less.
i've made the checkbox right-sided. i'm also turning the vertical slider into a horizontal slider, but that's going pretty poorly. because in theory, what i've done should work. but what do you know, it doesn't, and i have to keep poking around to find what's missing.

here's a screenie. as you can see, the slider looks total crap (don't mind that), the checkbox gets cropped and the combobox gets resized - which is what i'll work on next.
Link to comment
Share on other sites

Hi,

I know it's been ages that I promised to look into this, but I finally played around with having modified (that is subclassed) CEGUI-Widgets in a separate dll.
In theory, this should work pretty easily, problem is that there appears to be a flaw in how the CEGUI-Plugin system is setup, so it's only possible to subclass CEGUICore-Widgets (that is abstract superclasses for TL-Widgets) and not the TL-Widgets themselves.

I posted at the CEGUI-Forums about it and will see if I get some hints on how to do it. And don't worry, SupSuper, pulling your changes over to our "own" Xenolook widgets should be pretty straightforward and I will provide ample of sample code (this time, I really mean it :blush1: ).

Anyway, keep up the good work.

Rincewind
Link to comment
Share on other sites

[quote name='rincewind' date='Mar 8 2005, 09:27 PM']Hi,

I know it's been ages that I promised to look into this, but I finally played around with having modified (that is subclassed) CEGUI-Widgets in a separate dll.
In theory, this should work pretty easily, problem is that there appears to be a flaw in how the CEGUI-Plugin system is setup, so it's only possible to subclass CEGUICore-Widgets (that is abstract superclasses for TL-Widgets) and not the TL-Widgets themselves.

I posted at the CEGUI-Forums about it and will see if I get some hints on how to do it. And don't worry, SupSuper, pulling your changes over to our "own" Xenolook widgets should be pretty straightforward and I will provide ample of sample code (this time, I really mean it  :blush1: ).

Anyway, keep up the good work.

Rincewind
[right][post="113412"]<{POST_SNAPBACK}>[/post][/right][/quote]thanks :)

update:
- checkbox works.
- combobox works.
- slider STILL doesn't work. basically, when i move the mouse left/right, the slider thumb moves up/down, and no matter how much i search the code, i can't find out why :blink:
Link to comment
Share on other sites

is the combobox dropdown still getting squashed? IIRC the lit arrow segment should be the same width as the checkbox block.this looks like it's getting deformed.
Link to comment
Share on other sites

[quote name='Vaaish' date='Mar 9 2005, 03:23 PM']is the combobox dropdown still getting squashed? IIRC the lit arrow segment should be the same width as the checkbox block.this looks like it's getting deformed.
[right][post="113476"]<{POST_SNAPBACK}>[/post][/right][/quote]don't worry, i fixed it after taking the screenshot.

also, any chances of getting me some horizontal slider graphics anytime soon? that slider just looks sooooo ugly ;)
Link to comment
Share on other sites

[quote name='SupSuper' date='Mar 9 2005, 10:44 AM'][quote name='Vaaish' date='Mar 9 2005, 03:23 PM']is the combobox dropdown still getting squashed? IIRC the lit arrow segment should be the same width as the checkbox block.this looks like it's getting deformed.
[right][post="113476"]<{POST_SNAPBACK}>[/post][/right][/quote]don't worry, i fixed it after taking the screenshot.

also, any chances of getting me some horizontal slider graphics anytime soon? that slider just looks sooooo ugly ;)
[right][post="113479"]<{POST_SNAPBACK}>[/post][/right]
[/quote]

I'll see if I can get working on it next week. things are pretty packed right now on my sched.
Link to comment
Share on other sites

the horizontal slider works! (thanks to CE for figuring out what was wrong) :)
i also rotated the standard TL slider graphics so that it wouldn't look so odd, though it still looks ugly since it's resized :P
Link to comment
Share on other sites

I've been having the same issues with building the statistics GUI, and Supsuper, if you could explain to me how your modifying the TaharezLook Widget graphics to use the xeno graphics, I would appreciate it. I think I might've figured it out though. You're taking the layout.png from xenocidegame\data\textures\ui and editing it to make the TaharezLook procedures pull the new images?

If this is the case, I'd have to go with Rincewind's suggestion that we build some Xeno-specific widgets for CEGUI, as I think that would be a better route.

Rincewind - How much have you looked into this? Should I attempt to build some widgets based on the code for TaharezLook? I don't have any idea how long or how big this task might end up being for me, but I could certainly take a shot at it. Currently, I had the idea of just using Buttons with specific outcomes to implement the Statistics GUI, after I found that the DropList and Checkbox TaharezLook widgets just weren't making it easy to customize for our images. However, I think creating our own widgets might be the way to go instead. SupSuper's idea of just redoing layout.png could work also, but I'd like the ability to edit the functionality of xeno widgets a little more than taharezlook properties allow for. (For instance, horz and vert formatting on the text attribute of checkboxes and buttons doesn't seem to be available... adding a separate statictext on top of every button is annoying).

Also, SupSuper, you were talking about having a lack of graphics before, but I see some good stuff in optionspanel.png, but nothing is being "cut out" for use in optionspanel.imageset...

Also, I could just be completely confused. Let me know.

(Out-of-place question - Is there a way to take screenshots of xeno built in? I tried alt-printscreen inside the app to no avail...)

Greets! Edited by arrendek
Link to comment
Share on other sites

[quote name='arrendek' date='Mar 12 2005, 09:46 AM']I've been having the same issues with building the statistics GUI, and Supsuper, if you could explain to me how your modifying the TaharezLook Widget graphics to use the xeno graphics, I would appreciate it. I think I might've figured it out though. You're taking the layout.png from xenocidegame\data\textures\ui and editing it to make the TaharezLook procedures pull the new images?

If this is the case, I'd have to go with Rincewind's suggestion that we build some Xeno-specific widgets for CEGUI, as I think that would be a better route.[/quote]yes, part of it was getting images of the combobox and checkbox in the layout.png and then editing the TL imageset to use them properly.
unfortunately, that isn't enough to get them to display properly, so i had to edit the standard TL code from CEGUI (since the TL isn't perfectly suited for our needs, this will probably happen many times).
that's why i haven't commited my changes. because first i have to "port" my changes to separate widgets on our own library, as soon as Rincewind shows me how to ;)
But to get to test them before doing that, I just edited the TL code directly and thus made my own build of the TL library.

[quote]Also, SupSuper, you were talking about having a lack of graphics before, but I see some good stuff in optionspanel.png, but nothing is being "cut out" for use in optionspanel.imageset...[/quote]i didn't say we had a lack of images. i just wanted someone from Art (eg. Vaaish) to get the widget images in layout.png (it seems specific widget graphics will have to go there and not in the texture for the particular screen, otherwise lots more hacking is required to get TL to use them properly. thus why they wren't "cut out").
why? because i can't just copy+paste them from optionspanel.png into layout.png, because paint messes up the transparency (and more). so i had to use flash for it, and it still didn't come out right. if you look carefully, the checkbox's bottom border is missing and the top/left borders of the combobox/checkbox are thicker than the rest. thus why this is a job for Art, and not me :P

[quote](Out-of-place question - Is there a way to take screenshots of xeno built in? I tried alt-printscreen inside the app to no avail...)

Greets!
[right][post="113802"]<{POST_SNAPBACK}>[/post][/right][/quote]just use printscreen, a "screenshot_1.png" file will be automatically saved to the "system" or "system_d" folder (depending on the build you're running). Edited by SupSuper
Link to comment
Share on other sites

[quote name='SupSuper' date='Mar 12 2005, 11:30 AM']yes, part of it was getting images of the combobox and checkbox in the layout.png and then editing the TL imageset to use them properly.
unfortunately, that isn't enough to get them to display properly, so i had to edit the standard TL code from CEGUI (since the TL isn't perfectly suited for our needs, this will probably happen many times).
that's why i haven't commited my changes. because first i have to "port" my changes to separate widgets on our own library, as soon as Rincewind shows me how to ;)
But to get to test them before doing that, I just edited the TL code directly and thus made my own build of the TL library.[/quote]Ok.... we definitely should just use our own widgets for this.

[quote]i didn't say we had a lack of images. i just wanted someone from Art (eg. Vaaish) to get the widget images in layout.png[/quote]Sorry, just wanted to make sure you hadn't just missed something. I can see your troubles with this.

[quote](it seems specific widget graphics will have to go there and not in the texture for the particular screen, otherwise lots more hacking is required to get TL to use them properly. thus why they wren't "cut out").[/quote]This is exactly why I would like to code our own widgets, so that we can specify different graphics, text formatting, etc. just using the properties... if it's possible. I think it is. Now that I see that I'm not the only one having issues with this, I have more motivation to code a more general solution, and not just a quick hack to solve my own issues.

[quote]just use printscreen, a "screenshot_1.png" file will be automatically saved to the "system" or "system_d" folder (depending on the build you're running).[/quote]Thanks for the info!

So, to make sure I don't overlap work unnecessarily, if Rincewind could reply and let me know how much work he's already done on this, and if its minimal, I'd like to see if I can get our own widgets working. However, my idea was to take the TaharezLook code and change it to make our own "XenoLook" widget package, which I'm not sure is the correct course of action... Any thoughts?

Cheers. :)
Link to comment
Share on other sites

[quote name='arrendek' date='Mar 12 2005, 05:54 PM']So, to make sure I don't overlap work unnecessarily, if Rincewind could reply and let me know how much work he's already done on this, and if its minimal, I'd like to see if I can get our own widgets working. However, my idea was to take the TaharezLook code and change it to make our own "XenoLook" widget package, which I'm not sure is the correct course of action... Any thoughts?

Cheers. :)
[right][post="113845"]<{POST_SNAPBACK}>[/post][/right][/quote]
Hi,

I played around with creating your own XenoLook a little. Creating new widgets in a separate dll and making them available is actually pretty easy. You can even have TaharezLook widgets and your own at the same time (just add a second WindowSet to xenocide.scheme).
Problem is the following:
You can easily extend widgets that are in CEGUICore, but it's impossible to extend widget classes in TaharezLook itself. So for example if you want to extend TLButton, you will have to copy&paste all the code over from the TaharezLook because you can't like to TaharezLook.lib (take a look at this thread over at CEGUI forums: [url="http://www.cegui.org.uk/modules/newbb/viewtopic.php?topic_id=527&forum=2"]Clicky[/url])

If you need help in figuring out how to do your own dll, just icq or pm me or post here in this thread. Basicly you just create a new project in our xenocide solution and replicate the settings from taharezLook in the CEGUI-solution. Then add your own module.h/module.cpp and the widgets (using a TLWidget and its factory as templates) The resulting dll (whose name has to end in _d for the debug build) then goes into system_d or system and you add the widgets therein to xenocide.scheme.

Good Luck,

Rincewind
Link to comment
Share on other sites

[quote name='rincewind' date='Mar 12 2005, 04:46 PM']Hi,

I played around with creating your own XenoLook a little. Creating new widgets in a separate dll and making them available is actually pretty easy. You can even have TaharezLook widgets and your own at the same time (just add a second WindowSet to xenocide.scheme).
Problem is the following:
You can easily extend widgets that are in CEGUICore, but it's impossible to extend widget classes in TaharezLook itself. So for example if you want to extend TLButton, you will have to copy&paste all the code over from the TaharezLook because you can't like to TaharezLook.lib (take a look at this thread over at CEGUI forums: [url="http://www.cegui.org.uk/modules/newbb/viewtopic.php?topic_id=527&forum=2"]Clicky[/url])

If you need help in figuring out how to do your own dll, just icq or pm me or post here in this thread. Basicly you just create a new project in our xenocide solution and replicate the settings from taharezLook in the CEGUI-solution. Then add your own module.h/module.cpp and the widgets (using a TLWidget and its factory as templates) The resulting dll (whose name has to end in _d for the debug build) then goes into system_d or system and you add the widgets therein to xenocide.scheme.

Good Luck,

Rincewind
[right][post="113865"]<{POST_SNAPBACK}>[/post][/right][/quote]

I think it's important for the project, so I'll take some time to look into it. I'll keep everyone updated on the task as I make progress.
Link to comment
Share on other sites

I guess arrendek that you have posted the task in the issue tracker... Dont you ;)

 

Greetings

Red Knight

i don't think he has :P

 

btw arrendek, if you need i can give you the code i got the done while editing the TL, like the horizontal slider code.

Link to comment
Share on other sites

I guess arrendek that you have posted the task in the issue tracker... Dont you ;)

 

Greetings

Red Knight

i don't think he has :P

 

btw arrendek, if you need i can give you the code i got the done while editing the TL, like the horizontal slider code.

 

 

Sorry, very busy this week, I'll be reporting back in for more stuff late this weekend or somesuch.

 

SupSuper, I wouldn't mind it, if you could let me take a gander at what you have already done, no point in reinventing the wheel.

Link to comment
Share on other sites

  • 2 weeks later...
Hi,

 

any status report on this?

 

Greetings,

 

Rincewind

 

Totally fragged lately with school, I'll get to it hopefully this coming week, depending on a few other life issues. So far the job looks totally do-able, but I might be asking eddie for an addition to CEGUI a little later to make things run even better.

Link to comment
Share on other sites

Hi,

 

any status report on this?

 

Greetings,

 

Rincewind

 

Totally fragged lately with school, I'll get to it hopefully this coming week, depending on a few other life issues. So far the job looks totally do-able, but I might be asking eddie for an addition to CEGUI a little later to make things run even better.

Actually, Eddie is no longer working on CEGUI. :( This doesn't mean that the project will die, just that they are looking for another maintainer. Also, I guess you can try to create a patch for it yourself (would also be good to show that the community is still active on it, to encourage potential maintainers).

 

Rincewind

Link to comment
Share on other sites

You might want to do some investigation on the "Falagard" widget set, that is supposed to be in the pipeline for CEGUI.

It is planned to be completely data driven and very flexible. Maybe there's already work in progress on it and it will provide some synergies.

Could also be that it's less work to help getting it working and use it for our purposes.

 

Rincewind

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...